aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Lange2009-07-19 00:58:01 +0000
committerNorbert Lange2009-07-19 00:58:01 +0000
commit396d6c86aa5128449d9e99020b28ace2a0492bdd (patch)
tree2d47d265c2a1fa5d31b9e3273612e41ae7ef1cfd
parent22ee23cac79a4af24f8f49b89411e50c5325aa47 (diff)
downloadscummvm-rg350-396d6c86aa5128449d9e99020b28ace2a0492bdd.tar.gz
scummvm-rg350-396d6c86aa5128449d9e99020b28ace2a0492bdd.tar.bz2
scummvm-rg350-396d6c86aa5128449d9e99020b28ace2a0492bdd.zip
add support for fadeout
svn-id: r42601
-rw-r--r--engines/kyra/sound_amiga.cpp9
-rw-r--r--sound/mods/maxtrax.cpp4
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index 233a11bcd0..ee4fba5f22 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -128,12 +128,17 @@ void SoundAmiga::playTrack(uint8 track) {
}
void SoundAmiga::haltTrack() {
-
-
}
void SoundAmiga::beginFadeOut() {
+ for (int i = 0x3F; i >= 0; --i) {
+ _driver->setVolume((byte)i);
+ _vm->delay(1000 / 50);
+ }
+ _driver->stopMusic();
+ _vm->delay(1000 / 50);
+ _driver->setVolume(0x40);
}
void SoundAmiga::playSoundEffect(uint8 track) {
diff --git a/sound/mods/maxtrax.cpp b/sound/mods/maxtrax.cpp
index 5908314536..6c7e19889b 100644
--- a/sound/mods/maxtrax.cpp
+++ b/sound/mods/maxtrax.cpp
@@ -90,8 +90,8 @@ void MaxTrax::interrupt() {
const uint16 stopTime = curEvent->stopTime;
ChannelContext &channel = _channelCtx[data & 0x0F];
- outPutEvent(*curEvent);
- debug("CurTime, EventDelta, NextDelta: %d, %d, %d", millis, eventDelta, eventDelta + curEvent[1].startTime );
+ // outPutEvent(*curEvent);
+ // debug("CurTime, EventDelta, NextDelta: %d, %d, %d", millis, eventDelta, eventDelta + curEvent[1].startTime );
if (cmd < 0x80) { // Note
const uint16 vol = (data & 0xF0) >> 1;