Microsoft DirectX 8.1 (Visual Basic) |
When there are no sounds playing, DirectSound stops the mixer engine and halts DMA (direct memory access) activity. If your application has frequent short intervals of silence, the overhead of starting and stopping the mixer each time a sound is played may be worse than the DMA overhead if you kept the mixer active. Also, some sound hardware or drivers may produce unwanted audible artifacts from frequent starting and stopping of playback.
If your application is playing audio almost continuously with only short breaks of silence, you can force the mixer engine to remain active by calling the DirectSoundPrimaryBuffer8.Play method.
To resume the default behavior of stopping the mixer engine when there are no sounds playing, call the DirectSoundPrimaryBuffer8.Stop method.
To obtain the primary buffer object, use the DirectSound8.CreatePrimarySoundBuffer method.