aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/made/music.cpp2
-rw-r--r--engines/saga/music.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index c3b36d3b8c..0b58a11774 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -63,6 +63,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);
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 732bd0b50c..75008efb7d 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -249,6 +249,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);