[Scummvm-cvs-logs] SF.net SVN: scummvm:[43204] scummvm/branches/gsoc2009-mods/sound/mods/ maxtrax.cpp

nolange at users.sourceforge.net nolange at users.sourceforge.net
Mon Aug 10 14:09:33 CEST 2009


Revision: 43204
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43204&view=rev
Author:   nolange
Date:     2009-08-10 12:09:31 +0000 (Mon, 10 Aug 2009)

Log Message:
-----------
fixed bug in tempoeffect

Modified Paths:
--------------
    scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp

Modified: scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp	2009-08-10 11:47:49 UTC (rev 43203)
+++ scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp	2009-08-10 12:09:31 UTC (rev 43204)
@@ -221,7 +221,7 @@
 				_playerCtx.tempoTime = 0;
 				newTempo += _playerCtx.tempoDelta;
 			}
-			_playerCtx.tickUnit = calcTempo(_playerCtx.tempoStart + newTempo, _playerCtx.vBlankFreq);
+			_playerCtx.tickUnit = calcTempo(newTempo, _playerCtx.vBlankFreq);
 		}
 	}
 
@@ -470,20 +470,13 @@
 	for (int i = 0; i < ARRAYSIZE(_voiceCtx); ++i)
 		killVoice((byte)i);
 
-	for (int i = 0; i < kNumChannels; ++i) {
+	for (int i = 0; i < ARRAYSIZE(_channelCtx); ++i) {
 		_channelCtx[i].flags = 0;
 		_channelCtx[i].lastNote = (uint8)-1;
 		resetChannel(_channelCtx[i], (i & 1) != 0);
-		_channelCtx[i].patch = &_patch[i];
+		_channelCtx[i].patch = (i < kNumChannels) ? &_patch[i] : 0;
 	}
 
-	for (int i = kNumChannels; i < ARRAYSIZE(_channelCtx); ++i) {
-		_channelCtx[i].flags = 0;
-		_channelCtx[i].lastNote = (uint8)-1;
-		resetChannel(_channelCtx[i], (i & 1) != 0);
-		_channelCtx[i].patch = 0;
-	}
-
 #ifdef MAXTRAX_HAS_MICROTONAL
 	for (int i = 0; i < ARRAYSIZE(_microtonal); ++i)
 		_microtonal[i] = (int16)(i << 8);


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