[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.187,1.188
Max Horn
fingolfin at users.sourceforge.net
Wed Mar 23 08:45:23 CET 2005
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12976
Modified Files:
mixer.cpp
Log Message:
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
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- mixer.cpp 22 Mar 2005 18:29:02 -0000 1.187
+++ mixer.cpp 23 Mar 2005 16:41:44 -0000 1.188
@@ -368,6 +368,7 @@
}
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;
}
More information about the Scummvm-git-logs
mailing list