diff options
author | Torbjörn Andersson | 2008-08-20 09:15:59 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2008-08-20 09:15:59 +0000 |
commit | 35b02acb39f9291a198e49bca425b131ae550096 (patch) | |
tree | 93b3617de73323f7e236c52ea0edc47d28489093 /engines | |
parent | eb35835f5ee5010bd38f99a6e0995e01b0c7013f (diff) | |
download | scummvm-rg350-35b02acb39f9291a198e49bca425b131ae550096.tar.gz scummvm-rg350-35b02acb39f9291a198e49bca425b131ae550096.tar.bz2 scummvm-rg350-35b02acb39f9291a198e49bca425b131ae550096.zip |
Moved the mutex locking a bit. (Consistent with how the AGOS engine does it.)
svn-id: r34050
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/music.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 7d4efd8079..4d77ee4ace 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -343,8 +343,6 @@ MusicPlayer::~MusicPlayer() { } void MusicPlayer::setVolume(int volume) { - Common::StackLock lock(_mutex); - // FIXME: Could we simply change MAXMIDIVOL to match ScummVM's range? volume = CLIP((255 * volume) / MAXMIDIVOL, 0, 255); _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume); @@ -354,6 +352,8 @@ void MusicPlayer::setVolume(int volume) { _masterVolume = volume; + Common::StackLock lock(_mutex); + for (int i = 0; i < 16; ++i) { if (_channel[i]) { _channel[i]->volume(_channelVolume[i] * _masterVolume / 255); |