Opened 16 years ago

Closed 16 years ago

Last modified 11 months ago

#960 closed defect (fixed)

ALL: midi fragment repeats after close ups.

Reported by: SF/logicdeluxe Owned by: SF/jamieson630
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game:

Description

ScummVM 0.5.0pre-cvs windows
Built on Jul 6 2003 17:06:09
When looking at things which then show up at a full
screen close up, the midi music repeats its most resent
few notes when you leave that close up screen again.
For example this happens when reading Plato's Dialogue
in IJ4, looking at a map piece in MI2 or looking at the
battery plans in DOTT and probably other items as well.
No matter if I use native midi or Adlib emulation. The
amount of this effects varies from just a fraction of a
second till up to a few seconds. This bug seems to be
there since the beginning of ScummVM as I checked all
release versions back to 0.1.0.

Ticket imported from: #766851. Ticket imported from: bugs/960.

Change History (8)

comment:1 by fingolfin, 16 years ago

Owner: set to SF/jamieson630

comment:2 by SF/darkshineknight, 16 years ago

Hi,
This is a really, really obvious bug. What actually happens
is ScummVM saves in a hidden state (*.c00, I think), which is
loaded again when you look away from the close-up
(actually, it is another room, and does not explicitly state
which room to return to, giving reason to save and load a
state).
Try viewing the close-up, listen to the point in the music just
when you enter the new room, then look away at any point in
time. The music will replay from that point.
I think that this bug should be moved from iMuse/Music to
Unknown Crash/Other. I also think that rather than using this
crude method of switching between rooms should be replaced
with something like loading two rooms at once, one being
paused (the original), and the other playing on the screen
(the close-up), or something like that.

comment:3 by SF/jamieson630, 16 years ago

First, this IS an iMuse/Music issue as later SCUMM games
made a distinction between saving the rest of the game state
temporarily, and saving the music state along with it. (This
behavior was customizable starting with Sam & Max.) In the
absence of such distinction in earlier SCUMM games, we may
or may not be making the correct assumption about whether
to include iMuse state information in the temporary
save/restore.

Second, the method that is currently implemented is, to my
knowledge, the way it was done in the original distro.
Completely revamping it is unwarranted and would probably
create a host of new bugs in the process.

My question is: how does the music behave in the original
distros (including Sam & Max)? If it has the same odd little
repetition quirk there, then not only is a fix unnecessary, it's
UNADVISED. Various SCUMM games made very precise
assumptions about the state of the music engine after a
temporary state is restored, and changing that behavior
causes numerous music glitches. (The later the game, the
more complex the assumptions. The assumptions made by
Sam & Max have a "pulling my hair out trying to comprehend
you" complexity rating.)

As time permits, I will check LEC distros for music behavior. If
anyone else can also run some checks and post here, it would
be most appreciated.

comment:4 by SF/logicdeluxe, 16 years ago

If the whole problem lies in this reloading that temporary
savegame, just include an ignore midi position switch in the
load state code.

I just checked the original interpreters with DOTT's battery
plans, with FOA's picture (the first item you get) and with
MI2's map piece. The music plays perfectly continuesly. On
regular savegame load, the music continues exactly at the
point it was while saving. (This was not the case in
pre-iMuse games, except for MI1 enhanced CD) There probably
is such a position ignoring feature in the original code. I
could not get run SAM right now, sorry.

comment:5 by fingolfin, 16 years ago

Summary: All: midi fragment repeats after close ups.ALL: midi fragment repeats after close ups.

comment:6 by SF/jamieson630, 16 years ago

Okay, I finally had a chance to check the original distros
today. You are correct, pre-S&M games assume a temporary
save will not include music info. Fixed this in latest CVS;
tested with DoTT and FOA.

comment:7 by SF/jamieson630, 16 years ago

Resolution: fixed
Status: newclosed

comment:8 by digitall, 11 months ago

Component: --Unset--Engine: SCUMM
Note: See TracTickets for help on using tickets.