Opened 21 years ago

Closed 20 years ago

#1429 closed defect (fixed)

SAM: Music stops after getting T-Rex tooth

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Sam and Max

Description

Sam & Max, english talkie version Recent ScummVM CVS snapshot

The music goes quiet after you get the T-Rex tooth. I'm attaching a savegame, and will add some debugging information.

Something else is strange, too: If I leave the room and re-enter before getting the tooth, music 80 keeps playing in the background for a while, after it should have stopped. I haven't looked into that, but it probably has something to do with the forced transition from the dinosaur music (mostly percussion) to the overall Dino Bungie Memorial theme.

Ticket imported from: #888161. Ticket imported from: bugs/1429.

Attachments (1)

samnmax.s25 (26.6 KB ) - added by eriktorbjorn 21 years ago.
Savegame right before getting the T-Rex tooth

Download all attachments as: .zip

Change History (12)

by eriktorbjorn, 21 years ago

Attachment: samnmax.s25 added

Savegame right before getting the T-Rex tooth

comment:1 by eriktorbjorn, 21 years ago

This is the iMUSE debugging output, with my comments (quite possibly incorrect) in brackets:

doCommand - 17 (0/17), 80, 0, 1, 8, 83, 0

[Set up a trigger so that music 80 will start music 83]

doCommand - 15 (0/15), 80, 0, 4

[Set up a "maybe jump" hook]

[80] SysEx: 01 04 03 00 02 02 00 00 01 F7

[The "maybe jump" hook is invoked - jump to track 2, beat 6, tick 0]

[80] SysEx: 00 01 F7

[The trigger is invoked]

doCommand - 8 (0/8), 83, 0, 0, 0, 0, 0, 0

[Start music 83 - music that plays while getting the tooth]

Starting music 83 [83] SysEx: 01 00 01 00 02 02 00 00 00 F7 Stopping music 80

[Music 80 was stopped by an End of Track META event in the MIDI parser.]

doCommand - 15 (0/15), 83, 0, 1 [83] SysEx: 01 00 02 00 02 01 00 00 01 F7 [83] SysEx: 01 01 03 00 02 01 00 00 01 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 doCommand - 15 (0/15), 80, 0, 2 doCommand - 14 (0/14), 82, 0, 1, 0, 60 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 doCommand - 259 (1/3), 80, 0, 64 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 doCommand - 17 (0/17), 83, 0, 1, 8, 80, 0 doCommand - 15 (0/15), 83, 0, 2 doCommand - 17 (0/17), 83, 0, 1, 15, 80, 0, 2 [83] SysEx: 01 02 04 00 02 01 00 00 00 F7 doCommand - 15 (0/15), 83, 0, 2 [83] SysEx: 00 01 F7 doCommand - 15 (0/15), 80, 0, 2, 0, 0, 0, 0 Stopping music 83

[Music 83 was stopped by an End of Track META event in the MIDI parser.]

[Sam & Max do the "We finally got the tooth!" speech, then...]

doCommand - 14 (0/14), 83, 0, 1, 0, 60

[Fade down music 83, which isn't playing]

doCommand - 14 (0/14), 80, 0, 1, 127, 60

[Fade up music 80, which also isn't playing]

comment:2 by SF/jamieson630, 21 years ago

I'm assigning this to my todo list so the next time Torbjrn asks me about it in IRC I don't have to go searching for it again. ;)

comment:3 by SF/jamieson630, 21 years ago

Owner: set to SF/jamieson630

comment:4 by SF/salty85, 20 years ago

Has anyone gotten anywhere, as to a work around for this?

comment:5 by SF/salty85, 20 years ago

Sorry, I created a workaround taht works for windows at least, after the fact that the music stops, save the game, quit ScummVM. Load ScummVM, delete the entry in the window for it, you have to reselect the item so it comes as a new item in ScummVM, when you then transition to a new area after loading the saved game, the music works.

comment:6 by eriktorbjorn, 20 years ago

The music just stops in this particular scene, not for the rest of the game. You don't have to save or quit ScummVM for it to start when you move to another room.

comment:7 by SF/salty85, 20 years ago

Well then I had a more serious error than the one reported.
After getting the tooth my music stopped completely.
Restarting the game did not help, or loading a new game, even restarting the app did not help. It was as if the settings that scummvm made for the game were corrupted at the point.

comment:8 by SF/jamieson630, 20 years ago

If you're using Windows, a bit of confusion over the old and new game music settings may have caused a burst of music events to be generated and resulted in the Windows multimedia layer MMSYSTEM locking up. Happens a lot, and is not peculiar to ScummVM. Nothing for it but to restart Windows or, if you're adventurous, go into the hardware devices list and disable, then re-enable, the MIDI or wavetable/software synth device.

comment:9 by SF/salty85, 20 years ago

Wierd, all I needed to do was to delete the Scumm Entry for it, and relocate it and the problem was fixed.

comment:10 by eriktorbjorn, 20 years ago

Owner: changed from SF/jamieson630 to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:11 by eriktorbjorn, 20 years ago

I think I see the reason for this bug. It tries to set up two triggers with the same sound and id. Our implementation thinks it's ok to re-use a trigger slot if the new trigger has the same sound and id as an existing one, so the trigger to restart the music was lost.

I've changed the trigger handling slightly so that it only reuses the slot if the sound, id and the first command parameter are the same.

Note: See TracTickets for help on using tickets.