Forum > Audio and Video

[SOLVED] Initialize MMSystem

(1/1)

pcurtis:
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?

lucamar:
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.

pcurtis:
OK, thanks I'll try.

pcurtis:
OK, it helps. Thanks.

Navigation

[0] Message Index

Go to full version