Hello.
I am back from the front.
OK, there is a (litle) problem while creating new thread (player).
With LCL, a few memory (some bytes) are used at each creation/destroy of a thread.
[EDIT] Fixed in last commit: 5fc7602..43c3fd2
If you agree, could you test this on SimplePlayer demo:
- Set the FramesCount to 512 in uos_AddFromFile() and uos_AddIntoDevOut().
- Add a TTimer : timer1, enabled to
false and with interval of
50.
- Paste this for procedure timer1.onTimer:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
timer1.enabled := false;
uos_seek(PlayerIndex1, InputIndex1,0);
timer1.enabled := true;
end;
and at end of procedure Button3Click():
procedure TForm1.Button3Click(Sender: TObject);
begin
...
uos_Play(PlayerIndex1);
timer1.Enabled:=true; // ==> Add this.
...
Here it works very fast with regular interval and you should be a excellent drummer to follow that beat.
Fre;D