Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#8038 closed patch

Possible fix for bug #590511

Reported by: eriktorbjorn Owned by: SF/jamieson630
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 2

Description

This should fix bug #590511 ("MI2: No music if room transition is too fast").

The problem here is that MI2 won't start the room's music if it's already playing, so if you're re-entering a room while its music is being faded out you won't get any music.

The only way I can think of to fix this is to change get_sound_status() so that it won't consider a fading-out sound to be playing. And, to avoid breaking the assumption that a sound can only be played by one player at a time, the fading-out sound is terminated.

Obviously this assumes that anyone who is asking "is this sound playing?" really means "is it ok if I start playing this sound now?" Is that a safe assumption to make?

Ticket imported from: #607175. Ticket imported from: patches/143.

Attachments (2)

fadefix.diff (1.3 KB ) - added by eriktorbjorn 22 years ago.
Patch against a September 9 CVS snapshot
fadefix2.diff (2.7 KB ) - added by eriktorbjorn 22 years ago.
Improved (?) patch against a September 10 CVS snapshot

Download all attachments as: .zip

Change History (9)

by eriktorbjorn, 22 years ago

Attachment: fadefix.diff added

Patch against a September 9 CVS snapshot

comment:1 by eriktorbjorn, 22 years ago

Darn, I see a possible problem already: The is_fading_out() function should really check to make sure the player is fading out to zero, not just fading out a bit.

I'll upload a new patch later.

by eriktorbjorn, 22 years ago

Attachment: fadefix2.diff added

Improved (?) patch against a September 10 CVS snapshot

comment:2 by eriktorbjorn, 22 years ago

This got more awkward than I first thought. What I'd really like to do is to store the volume to fade to in VolumeFader, but then I'd probably have to break savegame compatibility.

comment:3 by Kirben, 22 years ago

Patch added to cvs

comment:4 by Kirben, 22 years ago

Status: newclosed

comment:5 by SF/jamieson630, 22 years ago

Owner: set to SF/jamieson630

comment:6 by SF/jamieson630, 22 years ago

Bug #622606 represents a regression introduced by this patch. It would seem that several tracks in the FOA intro are in a fade process, and they are consequently cut off at one point in the intro. Furthermore, one of those tracks is a "background" track that is silent but provides marker information for starting up other tracks. Since it gets stopped, certain other musical passages never start. The result is dead silence.

I am reversing the offending portion of this patch. The hack for Sam & Max in start_sound (which determines if the sound is already playing and, if so, restarts it) should accomplish the same thing.

Erik, since I have not observed the problem in MI2, perhaps you could revisit this and tell me if the latest CVS tree (imuse.cpp version 1.64) still properly deals with fade-and- restart situations?

comment:7 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Monkey Island 2
Note: See TracTickets for help on using tickets.