[Scummvm-cvs-logs] SF.net SVN: scummvm:[33937] scummvm/branches/branch-0-12-0/engines/cine/ sound.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Sat Aug 16 14:05:44 CEST 2008


Revision: 33937
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33937&view=rev
Author:   buddha_
Date:     2008-08-16 12:05:44 +0000 (Sat, 16 Aug 2008)

Log Message:
-----------
Backport of r33935: Changed AdlibRegisterSoundInstrument's member variables from unsigned 16-bit to unsigned 8-bit.
Fixes the crash in AdlibSoundDriver::setupInstrument() eriktorbjorn was getting in Future Wars
when teleporting from the photocopier room to the swamp.
There was a OPLWriteReg(_opl, 0x80 | car, reg->sustainRelease) call with sustainRelease = 65452.
Now there shouldn't be any such calls made because the sustainRelease value is always 8-bit now.
Hopefully this won't break anything.

Modified Paths:
--------------
    scummvm/branches/branch-0-12-0/engines/cine/sound.cpp

Modified: scummvm/branches/branch-0-12-0/engines/cine/sound.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/cine/sound.cpp	2008-08-16 11:50:36 UTC (rev 33936)
+++ scummvm/branches/branch-0-12-0/engines/cine/sound.cpp	2008-08-16 12:05:44 UTC (rev 33937)
@@ -79,13 +79,13 @@
 const int PCSoundDriver::_noteTableCount = ARRAYSIZE(_noteTable);
 
 struct AdlibRegisterSoundInstrument {
-	uint16 vibrato;
-	uint16 attackDecay;
-	uint16 sustainRelease;
-	uint16 feedbackStrength;
-	uint16 keyScaling;
-	uint16 outputLevel;
-	uint16 freqMod;
+	uint8 vibrato;
+	uint8 attackDecay;
+	uint8 sustainRelease;
+	uint8 feedbackStrength;
+	uint8 keyScaling;
+	uint8 outputLevel;
+	uint8 freqMod;
 };
 
 struct AdlibSoundInstrument {


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