aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;