From bff43de73a082ab74f66bdd97b3ecb400c3c7df7 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Tue, 1 Oct 2002 18:11:30 +0000 Subject: changes for stoping sounds svn-id: r5062 --- sound/mixer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound') diff --git a/sound/mixer.cpp b/sound/mixer.cpp index c1ab3ed884..ef5c40af33 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -642,6 +642,11 @@ void SoundMixer::ChannelStream::mix(int16 * data, uint len) { const int16 * vol_tab = _mixer->_volumeTable; byte * end_of_data = _endOfData; + if (_toBeDestroyed) { + realDestroy(); + return; + } + if (_pos == end_of_data) { if (--_timeOut == 0) { realDestroy(); -- cgit v1.2.3