[Scummvm-git-logs] scummvm master -> 6dd8025fcddf14d72e8ffec3ea54cdcbf9007468

dreammaster noreply at scummvm.org
Sat Feb 15 04:39:20 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6dd8025fcd M4: RIDDLE: Fix midi volumes to be percents


Commit: 6dd8025fcddf14d72e8ffec3ea54cdcbf9007468
    https://github.com/scummvm/scummvm/commit/6dd8025fcddf14d72e8ffec3ea54cdcbf9007468
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-14T20:39:12-08:00

Commit Message:
M4: RIDDLE: Fix midi volumes to be percents

Changed paths:
    engines/m4/platform/sound/midi.cpp


diff --git a/engines/m4/platform/sound/midi.cpp b/engines/m4/platform/sound/midi.cpp
index ff7f7dd533e..510a5b4d6c5 100644
--- a/engines/m4/platform/sound/midi.cpp
+++ b/engines/m4/platform/sound/midi.cpp
@@ -91,11 +91,11 @@ void Midi::loop() {
 }
 
 void Midi::set_overall_volume(int vol) {
-	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol);
+	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol * 255 / 100);
 }
 
 int Midi::get_overall_volume() const {
-	return _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
+	return _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) * 100 / 255;
 }
 
 } // namespace Sound




More information about the Scummvm-git-logs mailing list