Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#13496 closed defect (fixed)

SCI: LSL6 music plays all instruments / tracks at once

Reported by: RayKoopa Owned by: athrxx
Priority: normal Component: Engine: SCI
Version: Keywords: audio, overlapping
Cc: RayKoopa Game: Leisure Suit Larry 6

Description (last modified by RayKoopa)

  • ScummVM 2.6.0git5915-gf29cdfcf46a (May 22 2022 09:53:09)
  • Game language: English
  • Game version: Hi-Res 1.000.000
  • Windows 11 21H2 10.0.22000.675

Steps to reproduce:

  • Start a new game.
  • Leave the hotel and enter the beach (either to the right of the pool, or to the top of the exterior bridge).
  • Wait for song to play the flute.
  • All flute tracks will start at once in the first run-through of the song. Then the second repeating part of the song plays normally. Sample comparison (AdLib) ScummVM <=> DOSBox

Additional info:

  • Music emulation does not matter (I reproduced it on AdLib, Midi, and MT32).
  • IIRC, this bug exists at least since SVGA support was added, as that made me try the game in ScummVM and notice this years ago, but I just switched to DOSBox back then thinking I couldn't figure out setting up MIDI properly.

Additional info from forum member Praetorian:

  • Also happens in original Lo-res version.
  • Beach music seemingly does not play at all when entering from the bridge.

Attachments (1)

lsl6hires.001 (42.9 KB ) - added by RayKoopa 2 years ago.

Download all attachments as: .zip

Change History (10)

by RayKoopa, 2 years ago

Attachment: lsl6hires.001 added

comment:1 by RayKoopa, 2 years ago

Cc: RayKoopa added

comment:2 by RayKoopa, 2 years ago

Description: modified (diff)

Clarify since when I believe this bug exists

comment:3 by antoniou79, 2 years ago

Component: AudioEngine: SCI
Keywords: audio overlapping added
Summary: LSL6 music plays all instruments / tracks at onceSCI: LSL6 music plays all instruments / tracks at once

comment:4 by sluicebox, 2 years ago

Some notes from taking a quick look at this:

  • The beach music is sound 860
  • Hi-res and lo-res have different sound 860 resources
  • Only hi-res sounds really bad. Lo-res sounds a little funky at the end but that might be normal, I don't know yet. Let's focus on hi-res first.
  • It's not a conflict with other sounds. I get same results when using the debugger to play sound 860 in other rooms with no other sounds.
  • SCI Companion also plays hi-res 860 with what sounds like too many notes/instruments.
  • SCI Viewer plays hi-res 860 nicely without the extra notes/instruments.
  • Hi-res and lo-res have script differences for deciding when to start and stop beach music, which isn't relevant to the problem, but does explain why which entrance you use affects things in lo-res.
  • It's not a regression; it happens in the first SCI32 version of ScummVM.

In other words, it seems entirely like a playback bug that this particular sound exposes.

Last edited 2 years ago by sluicebox (previous) (diff)

comment:5 by RayKoopa, 2 years ago

I also checked on the LORES 1.000.000 version now and have to add the following:

  • If the music plays, it sounds exactly as broken as HIRES for me (not happening in DOSBox).
  • Music never changes when using the bridge (when entering _and_ leaving the room). This _also_ happens in DOSBox so it seems to be a game bug that is fixed in HIRES.
Last edited 2 years ago by RayKoopa (previous) (diff)

comment:6 by sluicebox, 2 years ago

The problem seems to be that channels 9 and 12 are both being played in sound 860 when only one of them should be. I'm not sure which, or why. It does affect both versions, although the resulting effect is different because those channels are different between the two versions, at least on adlib with the two versions I have.

I came to this conclusion by toggling channels during playback in SCI Companion.

Confirmed (audibly) that lo-res in DOSBox only plays one of the two channels.

comment:7 by RayKoopa, 2 years ago

Other music is also affected:

  • The hotel hallway music instantly plays off with the flute in ScummVM, but only does after one run-through without it in DOSBox and as I remember it on real hardware. I'm playing through the game currently, listening closely...
  • The bar music (if playing a MIDI and not Burgundy's song) also plays all tracks at once.

EDIT: Music also seems to randomly disappear when saving / restoring games, but that may be another issue. However, restoring a game on the beach also gets it to incorrectly play both tracks at once again.

Last edited 2 years ago by RayKoopa (previous) (diff)

comment:8 by bluegr, 2 years ago

Owner: set to athrxx
Resolution: fixed
Status: newclosed

This has been fixed by athrxx in the following PR:

Thanks for reporting this, and thanks athrxx for fixing it! :)

comment:9 by RayKoopa, 2 years ago

I can confirm that this fixes all music bugs I previously noticed!

  • Hotel / Lobby (flute track available immediately)
  • Beach (playing multiple flute tracks)
  • Bar (playing multiple distorted guitar tracks immediately)

I also could no longer trigger the bug with music seemingly randomly getting muted during loading / saving games but I check that more thoroughly now and report a new bug if it returns.

Thanks a lot. This makes the emulation experience feel perfect now. :-)

Note: See TracTickets for help on using tickets.