I am trying to make a metronome in Delphi. To this end, I use a TTimer to play the beeps at the needed BPM :
procedure TTestForm.TimerMetronomeTimer(Sender: TObject);
PlaySound(PWideChar('100ms_sound.wav'), 0, SND_ASYNC);
end;
this works fine until you get under 1000ms intervals on the timer. Then it starts breaking down by cutting the sound, playing it delayed, etc... How can I make this work ?