[Scummvm-cvs-logs] SF.net SVN: scummvm:[48918] scummvm/trunk/engines/sci/sound
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Mon May 3 19:54:48 CEST 2010
Revision: 48918
http://scummvm.svn.sourceforge.net/scummvm/?rev=48918&view=rev
Author: m_kiewitz
Date: 2010-05-03 17:54:47 +0000 (Mon, 03 May 2010)
Log Message:
-----------
SCI: set signal in SCI0/SCI01 games, when samples have been played only. fixes sq3 guys from andromeda, but also doesn't screw up music in sq3new/kq1 - added comments about this issue
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/soundcmd.cpp
scummvm/trunk/engines/sci/sound/soundcmd.h
Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-05-03 16:56:16 UTC (rev 48917)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-05-03 17:54:47 UTC (rev 48918)
@@ -498,6 +498,10 @@
}
void SoundCommandParser::cmdStopSound(reg_t obj, int16 value) {
+ processStopSound(obj, value, false);
+}
+
+void SoundCommandParser::processStopSound(reg_t obj, int16 value, bool sampleFinishedPlaying) {
if (!obj.segment)
return;
@@ -517,9 +521,17 @@
PUT_SEL32V(_segMan, obj, SELECTOR(state), kSoundStopped);
} else {
PUT_SEL32V(_segMan, obj, SELECTOR(handle), 0);
- PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
}
+ // Set signal selector in sound SCI0 games only, when the sample has finished playing
+ // If we don't set it at all, we get a problem when using vaporizer on the 2 guys
+ // If we set it all the time, we get no music in sq3new and kq1
+ // FIXME: this *may* be wrong, it's impossible to find out in sierra DOS sci, because SCI0 under DOS didn't have
+ // sfx drivers included
+ // We need to set signal in sound SCI1+ games all the time
+ if ((_soundVersion > SCI_VERSION_0_LATE) || sampleFinishedPlaying)
+ PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
+
musicSlot->dataInc = 0;
musicSlot->signal = 0;
_music->soundStop(musicSlot);
@@ -812,7 +824,7 @@
musicSlot->sampleLoopCounter = currentLoopCounter;
}
if (!_music->soundIsActive(musicSlot)) {
- cmdStopSound(obj, 0);
+ processStopSound(obj, 0, true);
} else {
_music->updateAudioStreamTicker(musicSlot);
}
Modified: scummvm/trunk/engines/sci/sound/soundcmd.h
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.h 2010-05-03 16:56:16 UTC (rev 48917)
+++ scummvm/trunk/engines/sci/sound/soundcmd.h 2010-05-03 17:54:47 UTC (rev 48918)
@@ -130,6 +130,8 @@
void cmdSetSoundLoop(reg_t obj, int16 value);
void cmdSuspendSound(reg_t obj, int16 value);
+ void processStopSound(reg_t obj, int16 value, bool sampleFinishedPlaying);
+
#ifdef USE_OLD_MUSIC_FUNCTIONS
void changeSoundStatus(reg_t obj, int newStatus);
#endif
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