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

nolange at users.sourceforge.net nolange at users.sourceforge.net
Fri Jul 31 16:36:37 CEST 2009


Revision: 42962
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42962&view=rev
Author:   nolange
Date:     2009-07-31 14:36:37 +0000 (Fri, 31 Jul 2009)

Log Message:
-----------
process all DMA Events before Macros, for the unlikely chance of making a difference

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

Modified: scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp	2009-07-31 14:29:04 UTC (rev 42961)
+++ scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp	2009-07-31 14:36:37 UTC (rev 42962)
@@ -70,17 +70,21 @@
 void Tfmx::interrupt() {
 	assert(!_end);
 	++_playerCtx.tickCount;
+
 	for (int i = 0; i < kNumVoices; ++i) {
-		ChannelContext &channel = _channelCtx[i];
-		if (channel.dmaIntCount) {
+		if (_channelCtx[i].dmaIntCount) {
 			// wait for DMA Interupts to happen
-			int doneDma = getChannelDmaCount(channel.paulaChannel);
-			if (doneDma >= channel.dmaIntCount) {
-				channel.dmaIntCount = 0;
-				channel.macroRun = true;
+			int doneDma = getChannelDmaCount(i);
+			if (doneDma >= _channelCtx[i].dmaIntCount) {
+				_channelCtx[i].dmaIntCount = 0;
+				_channelCtx[i].macroRun = true;
 			}
 		}
+	}
 
+	for (int i = 0; i < kNumVoices; ++i) {
+		ChannelContext &channel = _channelCtx[i];
+
 		if (channel.sfxLockTime >= 0)
 			--channel.sfxLockTime;
 		else {


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