Opened 18 months ago

Last modified 17 months ago

#13901 new defect

SCUMM: [Monkey 1 EGA / CMS audio] CMS music and sound effects dissapear after loading saved game.

Reported by: vanfanel Owned by:
Priority: normal Component: Audio
Version: Keywords: CMS
Cc: Game: Monkey Island 1

Description

Hi there,

In Monkey 1 EGA using the CMS Audio system, saving a game while music is playing (for example, inside the Scumm Bar) and the loading the game results on missing music & sfx for the rest of the game.

There was a similar bug with CMS that was fixed time ago, but not the same:

https://bugs.scummvm.org/ticket/10696

Change History (5)

comment:1 by antoniou79, 18 months ago

I can partially confirm this, on Windows 10 with current dev build from master HEAD.

The music stops when reloading a game (which was saved in a room with music, eg. the Scumm Bar). However:

  • If you load the game from the ScummVM launcher (so exit the game, then load a game), the sfx will still play, and the room will have music the next time you visit it -- also all other music still plays.
  • If you load the game while in-game, you get the bugged behavior - no music and no sfx anymore.

Can you verify that this is the case for you too?

My guess as of yet is that something is not initialized, or more specifically not clean-up properly, when loading a game while the game is running. I'll have to look further into this.

Version 0, edited 18 months ago by antoniou79 (next)

comment:2 by athrxx, 17 months ago

Did you start the game with CMS sound from the beginning? Or did you change the sound setting later?

Unfortunately, savegames with different sound settings are often not compatible. This is especially true for MI1 when using CMS sound (the AdLib and Midi setting will put a data block of ~2.5 KB into the savegame, the CMS setting does not save a state at all, so switching between the settings is likely to cause major issues). I would like to fix this eventually (at least for future savegames), but we needn't mix this into your bug ticket if it isn't the actual cause of your problem...

comment:3 by athrxx, 17 months ago

Okay, after a quick debug session I found and fixed one bug that is probably related to this ticket ("missing music & sfx for the rest of the game"). CMS sound resources basically got invalidated after one use, so they were lost even when reloading a game (but indeed you'd get them back if reloading from the ScummVM launcher).

Another thing that I have not addressed is the restoration of sounds that were playing at the time of saving. I have to check if the original MI1 interpreter does that for CMS (probably yes). Since this would require to save the sound info into the savegame, it might make sense to fix it together with the incompatibility issue we have.

comment:4 by antoniou79, 17 months ago

From my side, I can verify that the fix works to address the missing sounds and music after re-loading in-game, as long as you revisit the room with the music that is.

in reply to:  2 comment:5 by eriktorbjorn, 17 months ago

Replying to athrxx:

Unfortunately, savegames with different sound settings are often not compatible. This is especially true for MI1 when using CMS sound (the AdLib and Midi setting will put a data block of ~2.5 KB into the savegame, the CMS setting does not save a state at all, so switching between the settings is likely to cause major issues). I would like to fix this eventually (at least for future savegames), but we needn't mix this into your bug ticket if it isn't the actual cause of your problem...

If you do manage to fix savegame incompatibility you can probably close https://bugs.scummvm.org/ticket/2693 as well, and wouldn't that be nice? :-)

Note: See TracTickets for help on using tickets.