aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
diff options
context:
space:
mode:
authorMax Horn2011-03-23 11:47:07 +0100
committerMax Horn2011-03-23 15:25:46 +0100
commit7b02dac3c5678bb47216495fc97130b98ff2bfe4 (patch)
treeebeba91f309e1321b4a72136d59672b696eb7849 /engines/sky
parent99dbecf3b4a14382fa867610a43201fc150bfda9 (diff)
downloadscummvm-rg350-7b02dac3c5678bb47216495fc97130b98ff2bfe4.tar.gz
scummvm-rg350-7b02dac3c5678bb47216495fc97130b98ff2bfe4.tar.bz2
scummvm-rg350-7b02dac3c5678bb47216495fc97130b98ff2bfe4.zip
ENGINES: Use Common::StackLock in more places
Diffstat (limited to 'engines/sky')
-rw-r--r--engines/sky/music/musicbase.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index 0d3cb65e1b..e1044a9505 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -44,7 +44,7 @@ MusicBase::~MusicBase() {
}
void MusicBase::loadSection(uint8 pSection) {
- _mutex.lock();
+ Common::StackLock lock(_mutex);
if (_currentMusic)
stopMusicInternal();
free(_musicData);
@@ -58,7 +58,6 @@ void MusicBase::loadSection(uint8 pSection) {
_numberOfChannels = _currentMusic = 0;
setupPointers();
startDriver();
- _mutex.unlock();
}
bool MusicBase::musicIsPlaying() {
@@ -69,9 +68,8 @@ bool MusicBase::musicIsPlaying() {
}
void MusicBase::stopMusic() {
- _mutex.lock();
+ Common::StackLock lock(_mutex);
stopMusicInternal();
- _mutex.unlock();
}
void MusicBase::stopMusicInternal() {
@@ -113,7 +111,7 @@ void MusicBase::loadNewMusic() {
}
void MusicBase::pollMusic() {
- _mutex.lock();
+ Common::StackLock lock(_mutex);
uint8 newTempo;
if (_onNextPoll.musicToProcess != _currentMusic)
loadNewMusic();
@@ -127,7 +125,6 @@ void MusicBase::pollMusic() {
updateTempo();
}
}
- _mutex.unlock();
_aktTime &= 0xFFFF;
}