#13447 closed defect (fixed)
SCI: LSL3: Garbled music after autosave / GMM save
Reported by: | eriktorbjorn | Owned by: | bluegr |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | ||
Cc: | Game: | Leisure Suit Larry 3 |
Description
Steps to reproduce:
Start Leisure Suit Larry 3. For full effect, use MIDI music.
Go to your home (the game will show the way) and hear Patti say she wants to divorce you. The music will stop during the scene. With General MIDI, I get a rather horrid background noise here already but the game says there is no native support for this so this is probably not a bug. It sounds fine with AdLib or MT-32 emulation.
Either wait for the game to auto-save, or press Ctrl+F5 and save that way. The music will restart, and with MT-32 there will be a lot of other background musical noises as well.
Change History (10)
comment:1 by , 3 years ago
Summary: | SCI: LSL2: Garbled music after autosave / GMM save → SCI: LSL3: Garbled music after autosave / GMM save |
---|
follow-up: 4 comment:2 by , 3 years ago
comment:3 by , 3 years ago
If I look at that line I pasted above, it seems to be taken 1:1 from kfile.cpp, line 1087.
Only that kfile.cpp has the necessary counterpart in line 1078:
g_sci->_soundCmd->pauseAll(true); // pause music
EDIT: Yes, that line in kfile.cpp is way older (older than 2012; it got moved around over time, so it's more difficult to track the actual commit).
comment:4 by , 3 years ago
Replying to athrxx:
The bug report is a bit difficult to understand for me (is there one issue? or are there multiple issues?).
I meant it as one issue: The music restarts (possibly with a lot of extra noises) after autosave. Then @sluicebox told me that a save from the global menu might be a shortcut to trigger the issue without having to wait for an autosave to happen.
comment:5 by , 3 years ago
Thanks for tracing the actual issue. I don't remember why I added this line in that commit. It might be because of music pausing/unpausing when loading from the GMM. Will check today
comment:6 by , 3 years ago
That line might be necessary to prevent saving sounds with status 'paused' instead of 'playing'. Which is probably relevant for SCI >=1. I think it would suffice to restore the proper pause counter state after the saving process (add a pauseAll(true) ). But that's just theory, I am not at any computer right now...
comment:7 by , 3 years ago
I took a quick look and agree that the issue here is pause mismatch introduced in the new save code.
Just to clarify a detail that I don't think is directly related, but interesting: I suspect that the "horrid background noise" eriktorbjorn is hearing is due to the hot tub "bubbles" sound effect (sound 216) that plays during this scene. That sound effect is the reason they paused the normal music when people are the hot tub. Most players have never heard the bubbles sound effect because it's empty for most drivers; I think it's only supposed to produce sounds on MT-32. Everyone else gets silence during this part. If sound 216 getting played in an unexpected way through MIDI then that could explain that part.
comment:8 by , 3 years ago
I suspect that the "horrid background noise" eriktorbjorn is hearing is due to the hot tub "bubbles" sound effect (sound 216) that plays during this scene.
That was my guess too. Though with MT-32 emulation, what I hear after the auto/GMM save doesn't sound like bubbles.
comment:9 by , 3 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Many thanks for the info provided and for tracking the issue!
This should be fixed in 8386e92d40dfcd61a12966d4502715f81580f9d4:
https://github.com/scummvm/scummvm/commit/8386e92d40dfcd61a12966d4502715f81580f9d4
Please try the next daily version
The bug report is a bit difficult to understand for me (is there one issue? or are there multiple issues?). What I can reproduce by saving in the scene where Kalalau waits at home is indeed an issue with the sound pausing/unpausing. Since it does not happen when entering and leaving the GMM (you really need to save) it is easy enough to track:
It seems to be triggered by the call
in metaengine.cpp, line 443. This unbalances our pause counters.
The purpose of that line is not clear to me. When I comment it out, the issue seems to be fixed. I can load the saved game and the pause state is restored correctly. But that might be a premature assessment of mine. The line was added recently in this commit:
https://github.com/scummvm/scummvm/commit/d8336a31ffbf12cfc4eb8687e5bb83e2dffa4964
Apparently, it was found to be necessary. But I don't know why(yet).