[Scummvm-git-logs] scummvm master -> e8542d8cb6db5c5dee48fdd2d939cb4493b3cd57
athrxx
noreply at scummvm.org
Wed Sep 14 15:25:52 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7c5b367b54 AUDIO: (FM-TOWNS) - restore audio cd settings on exit
e8542d8cb6 SCUMM: reset audio cd settings at startup
Commit: 7c5b367b5477a75f2ed19f626f8363b64cc8878f
https://github.com/scummvm/scummvm/commit/7c5b367b5477a75f2ed19f626f8363b64cc8878f
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-14T17:18:24+02:00
Commit Message:
AUDIO: (FM-TOWNS) - restore audio cd settings on exit
(The cd audio manager is a global object. It keeps its settings
when returning to the launcher)
Changed paths:
audio/softsynth/fmtowns_pc98/towns_audio.cpp
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
index 0e475a64a29..9fec2f88bdc 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
@@ -392,6 +392,11 @@ TownsAudioInterfaceInternal::~TownsAudioInterfaceInternal() {
delete[] _pcmChan;
}
delete _pcmDev;
+
+ // Restore cd audio settings to default (the settings will be kept when returning
+ // to the launcher, since the manager is a global object).
+ g_system->getAudioCDManager()->setVolume(Audio::Mixer::kMaxChannelVolume);
+ g_system->getAudioCDManager()->setBalance(0);
}
TownsAudioInterfaceInternal *TownsAudioInterfaceInternal::addNewRef(Audio::Mixer *mixer, TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver, bool externalMutex) {
Commit: e8542d8cb6db5c5dee48fdd2d939cb4493b3cd57
https://github.com/scummvm/scummvm/commit/e8542d8cb6db5c5dee48fdd2d939cb4493b3cd57
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-14T17:18:28+02:00
Commit Message:
SCUMM: reset audio cd settings at startup
(the audio cd manager is a global object, so it may start
up in SCUMM with wrong values)
Changed paths:
engines/scumm/scumm.cpp
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 3f0178f12aa..b13c8639234 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2087,6 +2087,14 @@ void ScummEngine::setupMusic(int midi, const Common::String &macInstrumentFile)
}
}
}
+
+ // Restore audio cd settings to defaults, since they might have been changed
+ // outside the engine (the audio cd manager is a global object). FM-Towns does
+ // these things in the sound driver, so we skip it here.
+ if (_sound->_musicType != MDT_TOWNS && (_game.features & GF_AUDIOTRACKS)) {
+ g_system->getAudioCDManager()->setVolume(Audio::Mixer::kMaxChannelVolume);
+ g_system->getAudioCDManager()->setBalance(0);
+ }
}
void ScummEngine::syncSoundSettings() {
More information about the Scummvm-git-logs
mailing list