[Scummvm-cvs-logs] SF.net SVN: scummvm:[42304] scummvm/branches/gsoc2009-mods/sound/mods/ maxtrax.cpp
nolange at users.sourceforge.net
nolange at users.sourceforge.net
Thu Jul 9 18:18:36 CEST 2009
Revision: 42304
http://scummvm.svn.sourceforge.net/scummvm/?rev=42304&view=rev
Author: nolange
Date: 2009-07-09 16:18:35 +0000 (Thu, 09 Jul 2009)
Log Message:
-----------
fixed some mismatched new[]/delete
fixed 2 bugs in the calcnote function
Modified Paths:
--------------
scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp
Modified: scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp 2009-07-09 16:16:08 UTC (rev 42303)
+++ scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp 2009-07-09 16:18:35 UTC (rev 42304)
@@ -199,7 +199,7 @@
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 @@
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::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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list