I've been working on a little tool the past few days and the functionality itself is fine. I wanted to make the tool a little nicer to work with (at least for me) and included a sound-file (called test.wav) which plays one of my favorite songs.
The idea was that the song constantly repeats itself but after one go through, the music stops. This is my code-snippet for the music-part:
procedure TForm1.music();
begin
PlaySound('test.wav', 0, SND_ASYNC);
end;
When i change SND_ASYNC to SND_LOOP and start debug my project my .exe-Windows does not appear but the music plays (also just once).
Also the Procedure is called at the project.lpr:
begin
...
Form1.music();
Application.Run;
So how do I get the music to play in a constant loop? It doesn't have to be .wav btw.