From 4cbac8a2bbca9ba519a66428df97e85ba5223b4c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 27 Dec 2009 15:23:56 +0000 Subject: Added some currently disabled code to be used when sound fading is done (needs testing) svn-id: r46649 --- engines/sci/sfx/music.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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); + } } } -- cgit v1.2.3