mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 16:59:06 +00:00
SCI: set signal in SCI0/SCI01 games, when samples have been played only. fixes sq3 guys from andromeda, but also doesn't screw up music in sq3new/kq1 - added comments about this issue
svn-id: r48918
This commit is contained in:
parent
c67344d380
commit
b07a88548f
@ -498,6 +498,10 @@ void SoundCommandParser::cmdDisposeSound(reg_t obj, int16 value) {
|
||||
}
|
||||
|
||||
void SoundCommandParser::cmdStopSound(reg_t obj, int16 value) {
|
||||
processStopSound(obj, value, false);
|
||||
}
|
||||
|
||||
void SoundCommandParser::processStopSound(reg_t obj, int16 value, bool sampleFinishedPlaying) {
|
||||
if (!obj.segment)
|
||||
return;
|
||||
|
||||
@ -517,9 +521,17 @@ void SoundCommandParser::cmdStopSound(reg_t obj, int16 value) {
|
||||
PUT_SEL32V(_segMan, obj, SELECTOR(state), kSoundStopped);
|
||||
} else {
|
||||
PUT_SEL32V(_segMan, obj, SELECTOR(handle), 0);
|
||||
PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
|
||||
}
|
||||
|
||||
// Set signal selector in sound SCI0 games only, when the sample has finished playing
|
||||
// If we don't set it at all, we get a problem when using vaporizer on the 2 guys
|
||||
// If we set it all the time, we get no music in sq3new and kq1
|
||||
// FIXME: this *may* be wrong, it's impossible to find out in sierra DOS sci, because SCI0 under DOS didn't have
|
||||
// sfx drivers included
|
||||
// We need to set signal in sound SCI1+ games all the time
|
||||
if ((_soundVersion > SCI_VERSION_0_LATE) || sampleFinishedPlaying)
|
||||
PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
|
||||
|
||||
musicSlot->dataInc = 0;
|
||||
musicSlot->signal = 0;
|
||||
_music->soundStop(musicSlot);
|
||||
@ -812,7 +824,7 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) {
|
||||
musicSlot->sampleLoopCounter = currentLoopCounter;
|
||||
}
|
||||
if (!_music->soundIsActive(musicSlot)) {
|
||||
cmdStopSound(obj, 0);
|
||||
processStopSound(obj, 0, true);
|
||||
} else {
|
||||
_music->updateAudioStreamTicker(musicSlot);
|
||||
}
|
||||
|
@ -130,6 +130,8 @@ private:
|
||||
void cmdSetSoundLoop(reg_t obj, int16 value);
|
||||
void cmdSuspendSound(reg_t obj, int16 value);
|
||||
|
||||
void processStopSound(reg_t obj, int16 value, bool sampleFinishedPlaying);
|
||||
|
||||
#ifdef USE_OLD_MUSIC_FUNCTIONS
|
||||
void changeSoundStatus(reg_t obj, int newStatus);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user