mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-01 15:09:47 +00:00
SCI: if song isn't playing, set signal and don't set fadeout/fadein variables - fixes lsl3 music lost after entering/exiting tv room (bug #3007406)
svn-id: r49500
This commit is contained in:
parent
ea2e2053f2
commit
f743468ec7
@ -666,6 +666,13 @@ void SoundCommandParser::cmdFadeSound(reg_t obj, int16 value) {
|
||||
|
||||
int volume = musicSlot->volume;
|
||||
|
||||
// If sound is not playing currently, set signal directly
|
||||
if (musicSlot->status != kSoundPlaying) {
|
||||
warning("cmdFadeSound: fading requested, but sound is currently not playing");
|
||||
writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_argc) {
|
||||
case 2: // SCI0
|
||||
// SCI0 fades out all the time and when fadeout is done it will also stop the music from playing
|
||||
@ -688,12 +695,6 @@ void SoundCommandParser::cmdFadeSound(reg_t obj, int16 value) {
|
||||
error("cmdFadeSound: unsupported argc %d", _argc);
|
||||
}
|
||||
|
||||
// If sound is not playing currently, set signal directly
|
||||
if (musicSlot->status != kSoundPlaying) {
|
||||
warning("cmdFadeSound: fading requested, but sound is currently not playing");
|
||||
writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
|
||||
}
|
||||
|
||||
debugC(2, kDebugLevelSound, "cmdFadeSound: to %d, step %d, ticker %d", musicSlot->fadeTo, musicSlot->fadeStep, musicSlot->fadeTickerStep);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user