Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1148 closed defect (fixed)

MI1: SFX stops music

Reported by: SF/logicdeluxe Owned by: SF/jamieson630
Priority: low Component: Engine: SCUMM
Keywords: Cc:
Game: Monkey Island 1

Description

ScummVM 0.5.3cvs (Aug 13 2003 02:55:48) This happens in EGA and VGA Floppy versions. For example, go to the Scumm Bar and close the door or wait for the chef (who also operates a door)! With the original interpreter no SFX is played while music is playing, ie you can not hear a door while inside the Scumm Bar. Of course, it would not hurt hearing the door even when the music is playing, but this should not stop the music. Playing both simultaniuosly makes sense, of course, if this would be possible.

Ticket imported from: #787610. Ticket imported from: bugs/1148.

Attachments (1)

monkeyvga.s05 (60.4 KB ) - added by SF/logicdeluxe 17 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Kirben, 17 years ago

The problem is that monkeyega/vga don't always stop current music when a new music track is started. We used to work around this problem by always stopping music first when new sound was played. I added hack to ScummVM cvs for now, to work around problem

jamieson, could you have a look at how best to handle this problem ?
I think we basically need a function that tells whether currently loaded sound resource is music or sfx. It would be set when *src_ptr = 0x80 in convertADResource of scumm/resource.cpp and be checked when ScummVM attempts to play sound later in playSound of scumm/sound.cpp

comment:2 by Kirben, 17 years ago

Owner: set to SF/jamieson630

by SF/logicdeluxe, 17 years ago

Attachment: monkeyvga.s05 added

comment:3 by SF/logicdeluxe, 17 years ago

ScummVM 0.5.3cvs (Aug 13 2003 14:56:49) It's even worse now. Load the samegame, leave the catacombs and enter them egain! Both scores are playing at the same time.

comment:4 by Kirben, 17 years ago

I reverted my change for now, since it made it worse. Did the original monkeyega or monkeyvga ever play music and sound effects at the same time when using adlib ?

comment:5 by SF/logicdeluxe, 17 years ago

As I wrote before, the original interpreter does not play sound effects while music is playing already. But it would be nice, if ScummVM could do this correctly.

comment:6 by SF/jamieson630, 17 years ago

Just to tick some people off: to do it "correctly" would be to do it exactly the way the original distro did it. To do it "better" would be to support SFX and music simultaneously. Don't confuse the two.

The dilemma right now is (1) Roland tracks have no music/SFX identifier, and (2) the Adlib identifier for music versus SFX seems to be in question. Forcing one sound resource to stop when another one wants to play becomes necessary because explicit music stops are not always being issued by the scripts -- and looping music will just go on playing forever, on top of everything else.

One alternative might be to issue a stop_all_sounds() when the room changes, on the assumption that music (and SFX even moreso) will not persist from one room to the next. Already, though, I'm thinking of the forest scene in monkeyvga, where IIRC the music persists as guybrush wanders all through the forest, and doesn't stop until he reaches the treasure site or the Swordmaster's house.

I'll look at the scripts related to the Lookout scene in the monkeyvga intro to see if there are circumstances under which they DO properly shutdown the music when they're done. We might just have a VAR set up wrong, as was the case with VAR_SOUNDCARD and the Roland tracks.

comment:7 by SF/jamieson630, 17 years ago

Priority: normallow

comment:8 by Kirben, 17 years ago

Fixed in ScummVM cvs, by adding unique ASFX tag for adlib sfx.

comment:9 by Kirben, 17 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.