XAudio2: Stop Currently Playing Sound

July 2, 2011.netslimdxxaudio2

Using SlimDX, if you want to stop a sound which is currently playing via XAudio2, use the following methods on the SourceVoice object:

sourceVoice.Stop();
sourceVoice.FlushSourceBuffers();