From 3084724d7d37ef5f1a21236034c8896234a47dde Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 23 Mar 2005 16:41:44 +0000 Subject: To prevent race conditions, SoundMixer::isSoundHandleActive must lock the mixer mutex. That change might however cause regressions (read: dead locks) if some code calls isSoundHandleActive from within a sound callback... if you encounter any, please tell me svn-id: r17209 --- sound/mixer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/mixer.cpp b/sound/mixer.cpp index 21c73d4b18..1785f937ae 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -368,6 +368,7 @@ bool SoundMixer::isSoundIDActive(int id) { } bool SoundMixer::isSoundHandleActive(SoundHandle handle) { + Common::StackLock lock(_mutex); const int index = handle._val % NUM_CHANNELS; return _channels[index] && _channels[index]->_handle._val == handle._val; } -- cgit v1.2.3