aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-01 21:44:50 +0000
committerMartin Kiewitz2010-01-01 21:44:50 +0000
commit37d56920effc9875de9cd5639435c9ddec07dd23 (patch)
tree7676475c1ae2afe4c9cb72bd0b9456139a2c3ba2
parent44dc3f9bfbac271fb566ea603f720616b958d31c (diff)
downloadscummvm-rg350-37d56920effc9875de9cd5639435c9ddec07dd23.tar.gz
scummvm-rg350-37d56920effc9875de9cd5639435c9ddec07dd23.tar.bz2
scummvm-rg350-37d56920effc9875de9cd5639435c9ddec07dd23.zip
SCI/newmusic: changed fade volume setting for digital fx to onTimer() again, because setting it in updateCues() wont work right. We are processing fading effectively in there any way, added TODO for working approach
svn-id: r46853
-rw-r--r--engines/sci/sfx/music.cpp5
-rw-r--r--engines/sci/sfx/soundcmd.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp
index 509e3b6535..96b43db1ae 100644
--- a/engines/sci/sfx/music.cpp
+++ b/engines/sci/sfx/music.cpp
@@ -569,6 +569,11 @@ void MusicEntry::doFade() {
// Only process MIDI streams in this thread, not digital sound effects
if (pMidiParser)
pMidiParser->setVolume(volume);
+ // TODO: create onTimer within audio.cpp to do the handling there, if we do it in cmdUpdateCues it wont
+ // work right, because the last volume set won't get done at all. Also we are fading digital sound effects
+ // currently here in any case currently. Fade code should get moved to void SciMusic::onTimer()
+ if (hCurrentAud)
+ mixer->setChannelVolume(musicSlot->hCurrentAud, volume);
}
}
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index f4b06c5fb5..5d610d6821 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -782,10 +782,6 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) {
musicSlot->status = kSoundStopped;
} else {
musicSlot->ticker = (uint16)(mixer->getSoundElapsedTime(musicSlot->hCurrentAud) * 0.06);
-
- // Handle fading
- if (musicSlot->fadeStep)
- mixer->setChannelVolume(musicSlot->hCurrentAud, musicSlot->volume);
}
}