aboutsummaryrefslogtreecommitdiff
path: root/engines/touche/midi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/touche/midi.cpp')
-rw-r--r--engines/touche/midi.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/touche/midi.cpp b/engines/touche/midi.cpp
index cbb431ac22..fd8a9c4add 100644
--- a/engines/touche/midi.cpp
+++ b/engines/touche/midi.cpp
@@ -80,11 +80,13 @@ void MidiPlayer::adjustVolume(int diff) {
void MidiPlayer::setVolume(int volume) {
_masterVolume = CLIP(volume, 0, 255);
+ _mutex.lock();
for (int i = 0; i < NUM_CHANNELS; ++i) {
if (_channelsTable[i]) {
_channelsTable[i]->volume(_channelsVolume[i] * _masterVolume / 255);
}
}
+ _mutex.unlock();
}
int MidiPlayer::open() {