ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit 992427b9edf98c2d0f8b92493e8456193668b74a
parent 5dca43d1a307ba6d2288c4be9ff7d3f705aaabc4
Author: Olav Sørensen <olav.sorensen@live.no>
Date:   Tue,  6 Jul 2021 16:50:27 +0200

Just some minor changes

Diffstat:
Msrc/ft2_replayer.c | 4++--
Msrc/ft2_sample_loader.c | 5++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/ft2_replayer.c b/src/ft2_replayer.c @@ -265,7 +265,7 @@ double dLinearPeriod2Hz(int32_t period) const uint32_t quotient = invPeriod / 768; const uint32_t remainder = invPeriod % 768; - return dLogTab[remainder] * dExp2MulTab[(14-quotient) & 31]; // x = y / 2^((14-quotient) & 31) + return dLogTab[remainder] * dExp2MulTab[(14-quotient) & 31]; // x = y >> ((14-quotient) & 31); } double dAmigaPeriod2Hz(int32_t period) @@ -400,7 +400,7 @@ void keyOff(channel_t *ch) void calcReplayerLogTab(void) { for (int32_t i = 0; i < 32; i++) - dExp2MulTab[i] = 1.0 / exp2(i); // 1/2^i + dExp2MulTab[i] = 1.0 / exp2(i); // 1/(2^i) for (int32_t i = 0; i < 768; i++) dLogTab[i] = 8363.0 * 256.0 * exp2(i / 768.0); diff --git a/src/ft2_sample_loader.c b/src/ft2_sample_loader.c @@ -38,9 +38,8 @@ enum char *supportedSmpExtensions[] = { "iff", "raw", "wav", "snd", "smp", "sam", "aif", "pat", - "aiff","flac", + "aiff","flac", // IMPORTANT: Remember comma after last entry!!! - // IMPORTANT: Remember comma after last entry above "END_OF_LIST" // do NOT move, remove or edit this line! }; @@ -59,7 +58,7 @@ static void freeTmpSample(sample_t *s); // Crude sample detection routine. These aren't always accurate detections! static int8_t detectSample(FILE *f) { - uint8_t D[256]; + uint8_t D[512]; uint32_t oldPos = ftell(f); rewind(f);