diff options
author | Norbert Lange | 2009-07-31 14:36:37 +0000 |
---|---|---|
committer | Norbert Lange | 2009-07-31 14:36:37 +0000 |
commit | fd1fed0b6e14548e6e21b20fa3aeaa530096bddf (patch) | |
tree | dd43f7b0fc27cbdcb029b3855d1072137b34e640 /sound | |
parent | a4ebf2cfa693f84f535d7b1a47511004b0678d06 (diff) | |
download | scummvm-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.cpp | 16 |
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; |