aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/sfx/music.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp
index 225192d382..057b4677bf 100644
--- a/engines/sci/sfx/music.cpp
+++ b/engines/sci/sfx/music.cpp
@@ -373,9 +373,18 @@ void SciMusic::doFade(MusicEntry *pSnd) {
if (pSnd->volume + pSnd->fadeStep > pSnd->fadeTo) {
pSnd->volume = pSnd->fadeTo;
pSnd->fadeStep = 0;
- } else
+ } else {
pSnd->volume += pSnd->fadeStep;
+ }
+
pSnd->pMidiParser->setVolume(pSnd->volume);
+
+ if (pSnd->fadeStep == 0) {
+ // Signal the engine scripts that the sound is done fading
+ // FIXME: is this correct?
+ //SegManager *segMan = ((SciEngine *)g_engine)->getEngineState()->_segMan; // HACK
+ //PUT_SEL32V(segMan, pSnd->soundObj, signal, SIGNAL_OFFSET);
+ }
}
}