diff options
author | Max Horn | 2005-03-23 16:41:44 +0000 |
---|---|---|
committer | Max Horn | 2005-03-23 16:41:44 +0000 |
commit | 3084724d7d37ef5f1a21236034c8896234a47dde (patch) | |
tree | 6abf6049b3f5658a0acb6ec2579ac1896af53575 /sound | |
parent | 1826bda19483fd7ad9b30770d4bec87f167ce5ff (diff) | |
download | scummvm-rg350-3084724d7d37ef5f1a21236034c8896234a47dde.tar.gz scummvm-rg350-3084724d7d37ef5f1a21236034c8896234a47dde.tar.bz2 scummvm-rg350-3084724d7d37ef5f1a21236034c8896234a47dde.zip |
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
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mixer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |