Forum > Audio and Video

[SOLVED] Initialize MMSystem


When I first play a sound with  PlaySound(WavStream.Memory, 0, SND_NODEFAULT or SND_ASYNC or SND_MEMORY); there is a small delay +/- 200ms while MMSystem initializes, if I play again the delay is gone.
How can I initialize the MMSystem when I start the app?

It has been a long time but IIRC there is no "global" initialization per se, but if you call any of its functions at the start of the program (say, waveOutGetDevCaps()) the delay should (mostly) dissapear.

Though note that there will always be some delay the first time you play a new sound due to the internal initializations needed.

OK, thanks I'll try.

OK, it helps. Thanks.


[0] Message Index

Go to full version