[Scummvm-cvs-logs] scummvm master -> b16f2d8405bab54a891325f0c6dec156f6006b1a
fuzzie
fuzzie at fuzzie.org
Wed May 29 09:08:58 CEST 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b16f2d8405 SKY: Try to avoid deadlocks with the mixer mutex.
Commit: b16f2d8405bab54a891325f0c6dec156f6006b1a
https://github.com/scummvm/scummvm/commit/b16f2d8405bab54a891325f0c6dec156f6006b1a
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2013-05-29T00:05:20-07:00
Commit Message:
SKY: Try to avoid deadlocks with the mixer mutex.
See bug #3512069.
Changed paths:
engines/sky/music/musicbase.cpp
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index b388afd..944edb1 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -44,9 +44,9 @@ MusicBase::~MusicBase() {
}
void MusicBase::loadSection(uint8 pSection) {
- Common::StackLock lock(_mutex);
if (_currentMusic)
stopMusicInternal();
+ Common::StackLock lock(_mutex);
free(_musicData);
_currentSection = pSection;
_musicData = _skyDisk->loadFile(_driverFileBase + FILES_PER_SECTION * pSection);
@@ -70,13 +70,14 @@ bool MusicBase::musicIsPlaying() {
}
void MusicBase::stopMusic() {
- Common::StackLock lock(_mutex);
stopMusicInternal();
}
void MusicBase::stopMusicInternal() {
_mixer->stopHandle(_musicHandle);
+ Common::StackLock lock(_mutex);
+
for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++)
delete _channels[cnt];
_numberOfChannels = 0;
More information about the Scummvm-git-logs
mailing list