Microsoft DirectX 9.0

Looping Sounds

DirectSound does not directly support looping, or repetition of a portion of a sound. Although it is possible to implement looping on a static buffer by resetting the play cursor to the start of the loop each time it reaches the end of the loop, doing so might result in audio glitches, as DirectSound must discard any preprocessed data and begin preprocessing again.

To repeat a portion of a sound, play the sound in a streaming buffer and implement the loop in your source data.

See Also