[Scummvm-cvs-logs] SF.net SVN: scummvm: [21335] scummvm/trunk/engines/kyra/sound_adlib.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Thu Mar 16 09:40:03 CET 2006
Revision: 21335
Author: eriktorbjorn
Date: 2006-03-16 09:39:23 -0800 (Thu, 16 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21335&view=rev
Log Message:
-----------
I don't know if it's our bug, or a bug in the original Kyra music driver, but
updateCallback3() would call unkOutput2(9) in at least one case. This is
obviously wrong because it a) reads outside _regOffsets[], and b) writes to
invalid Adlib registers.
Now unkOutput2() has the same safeguards as noteOff() already had, making
callbackOutput() and updateCallback3() even more similar.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/sound_adlib.cpp
Modified: scummvm/trunk/engines/kyra/sound_adlib.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_adlib.cpp 2006-03-16 17:37:34 UTC (rev 21334)
+++ scummvm/trunk/engines/kyra/sound_adlib.cpp 2006-03-16 17:39:23 UTC (rev 21335)
@@ -612,9 +612,7 @@
channel.tempo = 0xFF;
channel.position = 0xFF;
channel.duration = 1;
- if (chan != 9) {
- unkOutput2(chan);
- }
+ unkOutput2(chan);
}
++_lastProcessed;
@@ -786,6 +784,11 @@
void AdlibDriver::unkOutput2(uint8 chan) {
debugC(9, kDebugLevelSound, "unkOutput2(%d)", chan);
+ // The control channel has no corresponding Adlib channel
+
+ if (chan >= 9)
+ return;
+
// I believe this has to do with channels 6, 7, and 8 being special
// when Adlib's rhythm section is enabled.
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