aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNorbert Lange2009-08-10 12:09:31 +0000
committerNorbert Lange2009-08-10 12:09:31 +0000
commit8cb42dd6896925106282abd23ce23812d6031989 (patch)
treea52f76d39c98fe27cd58b8802cc902ea3991eaf5 /sound
parentd63ddbdbbedf44c652170b89b268cb063ca4c0bb (diff)
downloadscummvm-rg350-8cb42dd6896925106282abd23ce23812d6031989.tar.gz
scummvm-rg350-8cb42dd6896925106282abd23ce23812d6031989.tar.bz2
scummvm-rg350-8cb42dd6896925106282abd23ce23812d6031989.zip
fixed bug in tempoeffect
svn-id: r43204
Diffstat (limited to 'sound')
-rw-r--r--sound/mods/maxtrax.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/mods/maxtrax.cpp b/sound/mods/maxtrax.cpp
index 2c92cf6b9f..3e60536013 100644
--- a/sound/mods/maxtrax.cpp
+++ b/sound/mods/maxtrax.cpp
@@ -221,7 +221,7 @@ endOfEventLoop:
_playerCtx.tempoTime = 0;
newTempo += _playerCtx.tempoDelta;
}
- _playerCtx.tickUnit = calcTempo(_playerCtx.tempoStart + newTempo, _playerCtx.vBlankFreq);
+ _playerCtx.tickUnit = calcTempo(newTempo, _playerCtx.vBlankFreq);
}
}
@@ -470,18 +470,11 @@ void MaxTrax::resetPlayer() {
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];
- }
-
- 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;
+ _channelCtx[i].patch = (i < kNumChannels) ? &_patch[i] : 0;
}
#ifdef MAXTRAX_HAS_MICROTONAL