[Scummvm-cvs-logs] SF.net SVN: scummvm:[50463] scummvm/trunk/engines/sci/sound
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Jun 29 00:06:19 CEST 2010
Revision: 50463
http://scummvm.svn.sourceforge.net/scummvm/?rev=50463&view=rev
Author: m_kiewitz
Date: 2010-06-28 22:06:19 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
SCI: ignoring set signal on tick 0 directly in parseNextEvent instead of filtering, also now ignoring channel volume changes on tick 0 (fixes lsl5 fading of sound 274, almost at the end), fixing also fading in gk1 and enabling fading in sci32 again
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
scummvm/trunk/engines/sci/sound/music.cpp
Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp 2010-06-28 22:01:26 UTC (rev 50462)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp 2010-06-28 22:06:19 UTC (rev 50463)
@@ -160,15 +160,6 @@
ticker += newDelta;
midiCommand = channel->data[channel->curPos++];
- if ((midiCommand == 0xCF) && (!ticker)) {
- // set signal command at tick 0?
- channel->curPos++;
- continue; // filter it
- // at least in kq5/french&mac the first scene in the intro has a song that sets signal to 4 immediately
- // on tick 0. Signal isn't set at that point by sierra sci and it would cause the castle daventry text to
- // get immediately removed, so we currently filter it.
- // TODO: find out what exactly happens in sierra sci
- }
if (midiCommand != kEndOfTrack) {
// Write delta
while (newDelta > 240) {
@@ -480,8 +471,14 @@
info.basic.param2 = 0;
if (info.channel() == 0xF) {// SCI special case
if (info.basic.param1 != kSetSignalLoop) {
- _signalSet = true;
- _signalToSet = info.basic.param1;
+ // at least in kq5/french&mac the first scene in the intro has a song that sets signal to 4 immediately
+ // on tick 0. Signal isn't set at that point by sierra sci and it would cause the castle daventry text to
+ // get immediately removed, so we currently filter it.
+ // Sierra SCI ignores them as well at that time
+ if (_position._play_tick) {
+ _signalSet = true;
+ _signalToSet = info.basic.param1;
+ }
} else {
_loopTick = _position._play_tick + info.delta;
}
@@ -556,8 +553,14 @@
}
}
switch (info.basic.param1) {
- case 7: // channel volume change -scale it
- info.basic.param2 = info.basic.param2 * _volume / MUSIC_VOLUME_MAX;
+ case 7: // channel volume change
+ if (!_position._play_tick) {
+ // if this is tried on tick 0, ignore the command
+ // this is needed for lsl5 sound resource 274, it sets channel volume to very low at the start
+ // sierra sci ignores those
+ parseNextEvent(_next_event);
+ return;
+ }
break;
}
info.length = 0;
Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp 2010-06-28 22:01:26 UTC (rev 50462)
+++ scummvm/trunk/engines/sci/sound/music.cpp 2010-06-28 22:06:19 UTC (rev 50463)
@@ -629,14 +629,6 @@
fadeStep = 0;
fadeCompleted = true;
}
-#ifdef ENABLE_SCI32
- // Disable fading for SCI32 - sound drivers have issues when fading in (gabriel knight 1 sierra title)
- if (getSciVersion() >= SCI_VERSION_2) {
- volume = fadeTo;
- fadeStep = 0;
- fadeCompleted = true;
- }
-#endif
// Only process MIDI streams in this thread, not digital sound effects
if (pMidiParser) {
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