diff options
author | Max Horn | 2011-03-23 11:47:07 +0100 |
---|---|---|
committer | Max Horn | 2011-03-23 15:25:46 +0100 |
commit | 7b02dac3c5678bb47216495fc97130b98ff2bfe4 (patch) | |
tree | ebeba91f309e1321b4a72136d59672b696eb7849 /engines/sky/music/musicbase.cpp | |
parent | 99dbecf3b4a14382fa867610a43201fc150bfda9 (diff) | |
download | scummvm-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/music/musicbase.cpp')
-rw-r--r-- | engines/sky/music/musicbase.cpp | 9 |
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; } |