From 2c3d5454a15f016f141d6a1019ad2e221dc93201 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 15 Nov 2015 12:27:58 +0100 Subject: [PATCH] This seems like a good idea as well, ref #254 --HG-- branch : develop --- code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index a22c68f55..021935e50 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -667,6 +667,8 @@ void CSourceXAudio2::stop() // stop source voice and remove pending buffers _SoundDriver->getXAudio2()->CommitChanges(_OperationSet); + if (FAILED(_SourceVoice->ExitLoop())) + nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED ExitLoop"); if (FAILED(_SourceVoice->Stop(0))) nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); if (FAILED(_SourceVoice->FlushSourceBuffers()))