diff options
author | Filippos Karapetis | 2010-01-02 15:02:41 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-02 15:02:41 +0000 |
commit | 5b5499e06f273cbfb7155f7fb8eebdb0dfe439fc (patch) | |
tree | 3437949fcf253644549bb2a2d9ba1d42c415a995 | |
parent | 1084b90fbb0d81b9c5add77e52968809552d18d1 (diff) | |
download | scummvm-rg350-5b5499e06f273cbfb7155f7fb8eebdb0dfe439fc.tar.gz scummvm-rg350-5b5499e06f273cbfb7155f7fb8eebdb0dfe439fc.tar.bz2 scummvm-rg350-5b5499e06f273cbfb7155f7fb8eebdb0dfe439fc.zip |
SCI/new music code: cleaned up cmdUpdateCues and changed the SCI reverb(?) SysEx in parseNextEvent() to a NOP for now, till its sorted out
svn-id: r46885
-rw-r--r-- | engines/sci/sfx/midiparser.cpp | 5 | ||||
-rw-r--r-- | engines/sci/sfx/soundcmd.cpp | 41 |
2 files changed, 18 insertions, 28 deletions
diff --git a/engines/sci/sfx/midiparser.cpp b/engines/sci/sfx/midiparser.cpp index 85ffd083b9..ce8810bbfc 100644 --- a/engines/sci/sfx/midiparser.cpp +++ b/engines/sci/sfx/midiparser.cpp @@ -133,10 +133,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { // http://wiki.scummvm.org/index.php/SCI/Specifications/Sound/SCI0_Resource_Format#Status_Reference // Also, sci/sfx/iterator/iterator.cpp, function BaseSongIterator::parseMidiCommand() switch (info.basic.param1) { - case 0x50: // set volume - // This is documented to be "reverb", but it looks like channel - // volume, at least in SCI11, so treat it as such - _pSnd->volume = info.basic.param2; + case 0x50: // set reverb break; case 0x52: // set hold _pSnd->hold = info.basic.param2; diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp index 1707eae08c..d308ba0602 100644 --- a/engines/sci/sfx/soundcmd.cpp +++ b/engines/sci/sfx/soundcmd.cpp @@ -785,9 +785,7 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { musicSlot->sampleLoopCounter = currentLoopCounter; } if (!mixer->isSoundHandleActive(musicSlot->hCurrentAud)) { - musicSlot->ticker = SIGNAL_OFFSET; - musicSlot->signal = SIGNAL_OFFSET; - musicSlot->status = kSoundStopped; + cmdStopSound(obj, 0); } else { musicSlot->ticker = (uint16)(mixer->getSoundElapsedTime(musicSlot->hCurrentAud) * 0.06); } @@ -796,33 +794,28 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { mixer->setChannelVolume(musicSlot->hCurrentAud, musicSlot->volume); musicSlot->fadeVolumeSet = false; } + } else { + switch (musicSlot->signal) { + case 0: + if (musicSlot->dataInc != GET_SEL32V(_segMan, obj, dataInc)) { + PUT_SEL32V(_segMan, obj, dataInc, musicSlot->dataInc); + PUT_SEL32V(_segMan, obj, signal, musicSlot->dataInc + 127); + } + break; + case SIGNAL_OFFSET: + cmdStopSound(obj, 0); + break; + default: + // Sync the signal of the sound object + PUT_SEL32V(_segMan, obj, signal, musicSlot->signal); + break; + } } - switch (musicSlot->signal) { - case 0: - if (musicSlot->dataInc != GET_SEL32V(_segMan, obj, dataInc)) { - PUT_SEL32V(_segMan, obj, dataInc, musicSlot->dataInc); - PUT_SEL32V(_segMan, obj, signal, musicSlot->dataInc + 127); - } - break; - case SIGNAL_OFFSET: - cmdStopSound(obj, 0); - break; - default: - // Sync the signal of the sound object - PUT_SEL32V(_segMan, obj, signal, musicSlot->signal); - break; - } // Sync loop selector for SCI0 if (_soundVersion <= SCI_VERSION_0_LATE) PUT_SEL32V(_segMan, obj, loop, musicSlot->loop); - // Signal the game when a digital sound effect is done playing - if (musicSlot->pStreamAud && musicSlot->status == kSoundStopped && - musicSlot->signal == SIGNAL_OFFSET) { - cmdStopSound(obj, 0); - } - musicSlot->signal = 0; if (_soundVersion >= SCI_VERSION_1_EARLY) { |