diff options
author | Filippos Karapetis | 2009-12-27 15:23:56 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-27 15:23:56 +0000 |
commit | 4cbac8a2bbca9ba519a66428df97e85ba5223b4c (patch) | |
tree | e700be04b46bf52b08790ab80af3ea398605c208 | |
parent | fbf1bada24e9ef415206780d4b3dc963e258e193 (diff) | |
download | scummvm-rg350-4cbac8a2bbca9ba519a66428df97e85ba5223b4c.tar.gz scummvm-rg350-4cbac8a2bbca9ba519a66428df97e85ba5223b4c.tar.bz2 scummvm-rg350-4cbac8a2bbca9ba519a66428df97e85ba5223b4c.zip |
Added some currently disabled code to be used when sound fading is done (needs testing)
svn-id: r46649
-rw-r--r-- | engines/sci/sfx/music.cpp | 11 |
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); + } } } |