aboutsummaryrefslogtreecommitdiff
path: root/sound/mods
diff options
context:
space:
mode:
Diffstat (limited to 'sound/mods')
-rw-r--r--sound/mods/maxtrax.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/mods/maxtrax.cpp b/sound/mods/maxtrax.cpp
index 371fe952b5..517ee6d135 100644
--- a/sound/mods/maxtrax.cpp
+++ b/sound/mods/maxtrax.cpp
@@ -199,7 +199,7 @@ void MaxTrax::killVoice(byte num) {
Paula::setChannelVolume(num, 0);
}
-int MaxTrax::calcNote(VoiceContext &voice) {
+int MaxTrax::calcNote(VoiceContext &voice) { // 0x39e16 Winuae
ChannelContext &channel = *voice.channel;
voice.lastPeriod = 0;
@@ -239,12 +239,12 @@ int MaxTrax::calcNote(VoiceContext &voice) {
voice.periodOffset += 1 << 16;
octave++;
}
+ } else
tone -= voice.periodOffset;
- }
- if (tone < PERIOD_LIMIT)
+ if (tone >= PERIOD_LIMIT)
// we need to scale with log(2)
voice.lastPeriod = (uint16)exp((float)tone * (float)(0.69314718055994530942 / 65536));
-
+ // 0x39EC8 jump -> 0x3a484 WinUAE
return octave;
}
@@ -370,8 +370,8 @@ void MaxTrax::noteOff(ChannelContext &channel, const byte note) {
void MaxTrax::freeScores() {
if (_scores) {
for (int i = 0; i < _numScores; ++i)
- delete _scores[i].events;
- delete _scores;
+ delete[] _scores[i].events;
+ delete[] _scores;
_scores = 0;
}
_numScores = 0;