aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFlorian Kagerer2010-08-04 16:53:09 +0000
committerFlorian Kagerer2010-08-04 16:53:09 +0000
commite5ffc7847cb70f792b4658aa032959949e849669 (patch)
tree0bba686f2c68bc0c15b5b03e532741299253d842 /engines
parentfbd7c8456705442f12c9c798c58ec146f0a85063 (diff)
downloadscummvm-rg350-e5ffc7847cb70f792b4658aa032959949e849669.tar.gz
scummvm-rg350-e5ffc7847cb70f792b4658aa032959949e849669.tar.bz2
scummvm-rg350-e5ffc7847cb70f792b4658aa032959949e849669.zip
AUDIO: Implement volume and balance control for the AudioCD manager (needed for music fading in Kyra 1 FM-Towns and probably other FM-Towns games). This addition applies to emulated CD audio only for now. I haven't found a way to implement this for real CDs yet. SDL doesn't seem to support this (but it might be just me? If anyone knows more about this, just tell me).
svn-id: r51741
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound_towns.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 5f877f7d8a..95e2a5e63f 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -66,6 +66,8 @@ bool SoundTowns::init() {
if (!loadInstruments())
return false;
+ _driver->cdaSetVolume(1, 118, 118);
+
return true;
}
@@ -90,6 +92,7 @@ void SoundTowns::playTrack(uint8 track) {
beginFadeOut();
if (_musicEnabled == 2 && trackNum != -1) {
+ _driver->cdaSetVolume(1, 118, 118);
AudioCD.play(trackNum+1, loop ? -1 : 1, 0, 0);
AudioCD.updateCD();
_cdaPlaying = true;
@@ -198,7 +201,7 @@ void SoundTowns::playSoundEffect(uint8 track) {
}
_driver->chanVolume(_sfxChannel, 127);
- _driver->chanStereo(_sfxChannel, 0x40);
+ _driver->chanPanPos(_sfxChannel, 0x40);
_driver->chanPitch(_sfxChannel, 0);
_driver->playSoundEffect(_sfxChannel, note, 127, sfxPlaybackBuffer);
}