program Test;
{$APPTYPE console}

uses Windows,Synth,Example1;

var Track:PSynthTrack;
//    mslength,np:int64;
begin
 new(Track);
 SynthInit(Track,SynthReadBMFSampleRate(@TrackData,integer(TrackSize)),2048);
 SynthReadBMF(Track,@TrackData,integer(TrackSize));
// mslength:=SynthSeekToMS(Track,-1);
 SynthPlay(Track);
 writeln('Playing... Press Ctrl+C to quit... Or just wait...');
 while true do begin
  sleep(10);
 {np:=SynthGetTimePosition(Track);
  if np>=mslength then begin
   break;
  end;}
 end;
 SynthEnter(Track);
 SynthStop(Track);
 SynthLeave(Track);
 SynthDone(Track);
 dispose(Track);
end.
