aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNorbert Lange2009-07-31 14:36:37 +0000
committerNorbert Lange2009-07-31 14:36:37 +0000
commitfd1fed0b6e14548e6e21b20fa3aeaa530096bddf (patch)
treedd43f7b0fc27cbdcb029b3855d1072137b34e640 /sound
parenta4ebf2cfa693f84f535d7b1a47511004b0678d06 (diff)
downloadscummvm-rg350-fd1fed0b6e14548e6e21b20fa3aeaa530096bddf.tar.gz
scummvm-rg350-fd1fed0b6e14548e6e21b20fa3aeaa530096bddf.tar.bz2
scummvm-rg350-fd1fed0b6e14548e6e21b20fa3aeaa530096bddf.zip
process all DMA Events before Macros, for the unlikely chance of making a difference
svn-id: r42962
Diffstat (limited to 'sound')
-rw-r--r--sound/mods/tfmx.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp
index 602045762d..5088deb86c 100644
--- a/sound/mods/tfmx.cpp
+++ b/sound/mods/tfmx.cpp
@@ -70,16 +70,20 @@ Tfmx::~Tfmx() {
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;