[C++] How to play mciSendString in async mode?

PlaySound returns immediately after beginning the sound. My file "5.wav" lasts a few seconds, but I can interrupt it immediately by pressing the key once again.
mciSendString "freezes" my program and I can do nothing until the playback has ended - is there any way to do it asynchronously, just like the playsound does?
I want to use mciSendString instead of PlaySound because I need to play few sounds at once.

I need a function that will be able to play asynchronously (like PlaySound) and few different files at once (like SendString)... :(

1
2
mciSendString("play C:/Piano/5.wav", NULL, 0, NULL);
PlaySound("C:/Piano/5.wav", NULL, SND_ASYNC);
Last edited on
Topic archived. No new replies allowed.