aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2007-12-09 23:55:57 +0000
committerJohannes Schickel2007-12-09 23:55:57 +0000
commite946eff2059e6b8b72b0a08e0df8017ace824a41 (patch)
treea5663c4d9b8cca9c1b74ed19e60506519c36abc0
parent3f5436a3d21933fa0a8b4b4ae9007b632b5c1a41 (diff)
downloadscummvm-rg350-e946eff2059e6b8b72b0a08e0df8017ace824a41.tar.gz
scummvm-rg350-e946eff2059e6b8b72b0a08e0df8017ace824a41.tar.bz2
scummvm-rg350-e946eff2059e6b8b72b0a08e0df8017ace824a41.zip
Added a hack to allow adjustment of Adlib volume. (see bug #1497961 "KYRA1: music/sfx volume settings not working")
svn-id: r29808
-rw-r--r--engines/kyra/sound_adlib.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index a3953aaf48..42b227b76a 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -444,7 +444,14 @@ AdlibDriver::AdlibDriver(Audio::Mixer *mixer, bool v2) {
_tablePtr1 = _tablePtr2 = 0;
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ // HACK: We use MusicSoundType here for now so we can adjust the volume in the launcher dialog.
+ // This affects SFX too, but if we want to support different volumes for SFX and music we would
+ // have to change our player implementation, currently we setup the volume for an AdLib channel
+ // in AdlibDriver::adjustVolume, so if that would be called, we would have to know if the channel
+ // is used by SFX or music, and then adjust the volume accordingly. Since Kyrandia 2 supports
+ // different volumes for SFX and music, looking at the disasm and checking how the original does it
+ // would be a good idea.
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
_samplesPerCallback = getRate() / CALLBACKS_PER_SECOND;
_samplesPerCallbackRemainder = getRate() % CALLBACKS_PER_SECOND;