#13555 closed defect (fixed)
LSL6HIRES: Door close sound plays at wrong moment
Reported by: | RayKoopa | Owned by: | sluicebox |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | sound | |
Cc: | Game: | Leisure Suit Larry 6 |
Description (last modified by )
ScummVM 2.7.0git101-gf37f00331ca (Jun 8 2022 14:35:39)
Game language: English
Game version: Hi-Res 1.000.000
Windows 11 21H2 10.0.22000.675
The soft bang sound when a door was closed plays at the wrong moment in case of the Sauna door:
Steps to reproduce:
- Start a new game.
- Go to the Health Spa, grab a towel.
- Go to the Locker Room and undress with the towel.
- Go to the mud baths, and enter the Sauna.
- Leave the Sauna. Notice how the door does not close with a sound.
- Do anything else generating a voice line. The door close sound will play once the voice line ended. - or - Click Game > Save-O-Matic™️ and accept or cancel the dialog to play the sound.
This also happens with the following doors:
- Electro-Shock to Mud Bath
- Mud Bath to Weight Room
- Aerobics Room to Swimming Pool
This does not happen in lo-res.
In DOSBox, the door close sound plays once the door closes, as with any other door.
Attachments (1)
Change History (8)
by , 2 years ago
Attachment: | lsl6hires.003 added |
---|
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
comment:3 by , 2 years ago
Unrelated, but this reminds me of a bug in a custom game engine I worked on once.
A sound was queued to start but also told to stop before the sound system could put it into the "playing sounds" list. When telling it to stop, it immediately iterated over this list, didn't find the sound, and thus never set it's immediate stop state, so the sound just started playing completely once the sound system did the next update...
Maybe SCI works kinda similar, who knows - well at least I sadly don't ;-)
comment:4 by , 2 years ago
Description: | modified (diff) |
---|
comment:5 by , 2 years ago
I see what's going on now: the interpreter for this game didn't support pausing digital samples *at all*. kDoSoundPause on a digital sample had no effect. That feature was added in the next version of the interpreter, dated a month later in 1994 in PQ4 CD.
ScummVM is doing the right thing by pausing the door sound, but the game scripts are doing the wrong thing by asking ScummVM to pause the door sound. They got away with it in the original because that feature didn't work so it didn't matter.
This sound code already has a lot of version checks so I want to proceed carefully with changes. But the problem is now known and the solution will be for ScummVM to not do anything when kDoSoundFade is called on digital sounds for certain games.
comment:6 by , 2 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in https://github.com/scummvm/scummvm/commit/3c6ebd89c09f4cd7b181ddbdacb38e7dd8290132
Thanks for reporting this!
Interesting, I don't know why this works in the original. The scripts pause the door-close sound immediately after playing it. Completing speech audio resumes paused sounds. Why does the door sound not pause in the original?
When entering mud bath (room 400) from the steam room (370) or the shock room (380):
Most sound objects in this game set flag $0001, the no-pause flag. Or, scenes are programmed like the entrance from the shower which waits on sound 33 to complete before calling handsOn.
That's why you can hear sound 33 briefly play and quickly stop. The background bubbles sound also pauses. In the original, only the bubbles pause. Maybe there's a timing thing where pausing doesn't work if the sample has just been queued to start? Or maybe a sample can't be interrupted with a pause at all? (The bubbles loop and aren't a sample)
I can eventually do some script-patch experiments to test some of these theories in the original.