[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,1.63,1.64
Jamieson Christian
jamieson630 at users.sourceforge.net
Mon Oct 21 01:18:06 CEST 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv32079/scummvm/scumm
Modified Files:
imuse.cpp
Log Message:
Patch #607175 correction to fix regression Bug #622606
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- imuse.cpp 21 Oct 2002 07:31:31 -0000 1.63
+++ imuse.cpp 21 Oct 2002 08:17:18 -0000 1.64
@@ -895,14 +895,17 @@
}
}
- // Make sure the requested sound is not already playing.
- // FIXME: This should NEVER happen, but until we get all of the
- // Sam & Max iMuse issues resolved, it does happen occasionally.
- // This hack is just to make playtesting tolerable.
+ // If the requested sound is already playing, start it over
+ // from scratch. This was originally a hack to prevent Sam & Max
+ // iMuse messiness while upgrading the iMuse engine, but it
+ // is apparently necessary to deal with fade-and-restart
+ // race conditions that were observed in MI2. Reference
+ // Bug #590511 and Patch #607175 (which was reversed to fix
+ // an FOA regression: Bug #622606).
int i;
for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
if (player->_active && player->_id == sound)
- return true; // break;
+ break;
}
if (!i)
@@ -1220,17 +1223,14 @@
{
int i;
Player *player;
-
for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
if (player->_active && player->_id == (uint16)sound) {
// Assume that anyone asking for the sound status is
// really asking "is it ok if I start playing this
// sound now?" So if the sound is about to fade out,
- // shut it down and pretend it wasn't playing.
- if (player->is_fading_out()) {
- player->clear();
+ // pretend it's not playing.
+ if (player->is_fading_out())
continue;
- }
return 1;
}
}
More information about the Scummvm-git-logs
mailing list