gents, it appears SND_LOOP argument in PlaySound() function causes issues. When sound is played all other controls on the form freeze up. Same thing in sndPlaySound.
Asynchronous execution (snd_ASYNC) does not affect controls, I can stop and play sound any moment. But SND_LOOP is no bueno.
Also, I have not tested it much, there is no looping going on.
I worked around the issue by looping the sound, which is played asynchronously, by external looping structure. Is it the issue with SND_LOOP or is it me doing something wrong? Also, peculiar fact, not every looping structure does work. When loop within repeat-until, or while-do, same thing happen with snd_Async specifier. I have to play sound through timer with onTimer event, which brings its own convolution, but at least form does not freeze up.
I am running Lazarus v2.2.6 on Windows 7. Will it work on better on Windows 10-11? Does it work better on Delphi?