[Scummvm-cvs-logs] SF.net SVN: scummvm:[47678] scummvm/trunk/engines/sci/sound/soundcmd.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Jan 29 20:02:13 CET 2010
Revision: 47678
http://scummvm.svn.sourceforge.net/scummvm/?rev=47678&view=rev
Author: thebluegr
Date: 2010-01-29 19:02:13 +0000 (Fri, 29 Jan 2010)
Log Message:
-----------
Reverting incorrect rev. 47675. The actual problem was that SCI0 doesn't clear a song's handle when stopping it, but when disposing it. Hopefully, a lot of the SCI0 sound oddities are fixed now...
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/soundcmd.cpp
Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-01-29 18:30:19 UTC (rev 47677)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-01-29 19:02:13 UTC (rev 47678)
@@ -488,6 +488,7 @@
cmdStopSound(obj, value);
_music->soundKill(musicSlot);
+ PUT_SEL32V(_segMan, obj, handle, 0);
if (_soundVersion >= SCI_VERSION_1_EARLY)
PUT_SEL32(_segMan, obj, nodePtr, NULL_REG);
else
@@ -511,14 +512,11 @@
return;
}
- // Don't modify the objects of sound slots that are already stopped,
- // as the associated objects could be disposed by the game scripts
- if (musicSlot->status != kSoundStopped) {
+ if (_soundVersion <= SCI_VERSION_0_LATE) {
+ PUT_SEL32V(_segMan, obj, state, kSoundStopped);
+ } else {
PUT_SEL32V(_segMan, obj, handle, 0);
- if (_soundVersion <= SCI_VERSION_0_LATE)
- PUT_SEL32V(_segMan, obj, state, kSoundStopped);
- else
- PUT_SEL32V(_segMan, obj, signal, SIGNAL_OFFSET);
+ PUT_SEL32V(_segMan, obj, signal, SIGNAL_OFFSET);
}
musicSlot->dataInc = 0;
@@ -907,13 +905,11 @@
const MusicList::iterator end = _music->getPlayListEnd();
for (MusicList::iterator i = _music->getPlayListStart(); i != end; ++i) {
- // Don't modify the objects of sound slots that are already stopped,
- // as the associated objects could be disposed by the game scripts
- if ((*i)->status != kSoundStopped) {
- if (_soundVersion <= SCI_VERSION_0_LATE)
- PUT_SEL32V(_segMan, (*i)->soundObj, state, kSoundStopped);
- else
- PUT_SEL32V(_segMan, (*i)->soundObj, signal, SIGNAL_OFFSET);
+ if (_soundVersion <= SCI_VERSION_0_LATE) {
+ PUT_SEL32V(_segMan, (*i)->soundObj, state, kSoundStopped);
+ } else {
+ PUT_SEL32V(_segMan, obj, handle, 0);
+ PUT_SEL32V(_segMan, (*i)->soundObj, signal, SIGNAL_OFFSET);
}
(*i)->dataInc = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list