Lazarus Play constant Music in Background [SOLVED] lazarus / 21-General ---------------------------------------------------------------------- AlphaInc. · 2021-04-01 05:08 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: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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. ---------------------------------------------------------------------- Mr.Madguy · 2021-04-01 07:20 I guess you need to combine SND_ASYNC with SND_LOOP, i.e. "SND_ASYNC or SND_LOOP". ---------------------------------------------------------------------- AlphaInc. · 2021-04-01 07:38 Yeah, that was the solution. Thank you!