mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user