Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ft2-clone for openSUSE:Factory checked in at 2026-10-26 10:02:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ft2-clone (Old) and /work/SRC/openSUSE:Factory/.ft2-clone.new.2252680 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ft2-clone" Mon Oct 26 10:02:09 2026 rev:50 rq:1392508 version:2.27 Changes: -------- --- /work/SRC/openSUSE:Factory/ft2-clone/ft2-clone.changes 2026-10-17 21:25:49.594941974 +0200 +++ /work/SRC/openSUSE:Factory/.ft2-clone.new.2252680/ft2-clone.changes 2026-10-26 10:03:42.629044634 +0100 @@ -1,0 +2,9 @@ +Sun Oct 25 18:12:36 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 2.27 + * Fixed: Sample files shouldn't be listed when in "Instr." item + mode in Disk Op. + * Fixed double-free memory bug when loading .OGG samples. + * Scope interpolation tweak (again). + +------------------------------------------------------------------- Old: ---- ft2-clone-2.26.1.tar.gz New: ---- ft2-clone-2.27.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ft2-clone.spec ++++++ --- /var/tmp/diff_new_pack.p9UdmB/_old 2026-10-26 10:03:44.507123394 +0100 +++ /var/tmp/diff_new_pack.p9UdmB/_new 2026-10-26 10:03:44.508123436 +0100 @@ -17,7 +17,7 @@ Name: ft2-clone -Version: 2.26.1 +Version: 2.27 Release: 0 Summary: Fasttracker II clone License: BSD-3-Clause AND CC-BY-NC-SA-4.0 ++++++ ft2-clone-2.26.1.tar.gz -> ft2-clone-2.27.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/ft2_audio.c new/ft2-clone-2.27/src/ft2_audio.c --- old/ft2-clone-2.26.1/src/ft2_audio.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/ft2_audio.c 2026-10-25 15:23:06.000000000 +0100 @@ -189,10 +189,10 @@ for (int32_t i = 0; i <= 256; i++) { // bit-accurate to how FT2 calculates it - int32_t ft2SqrtPan = (int32_t)round(65536.0 * sqrt(i / 256.0)); + int32_t ft2SqrtPan = (int32_t)round(65536.0 * sqrt(i * (1.0 / 256.0))); - // scale to 0.0 .. 1.0f for our float mixer - fSqrtPanningTable[i] = (float)ft2SqrtPan / 65536.0f; + // scale to 0.0f .. 1.0f for our float mixer + fSqrtPanningTable[i] = (float)(ft2SqrtPan * (1.0 / 65536.0)); } } @@ -351,7 +351,7 @@ if (status & CS_UPDATE_VOL) { v->fVolume = ch->fFinalVol; // 0.0f .. 1.0f - v->scopeVolume = (uint8_t)((ch->fFinalVol * (SCOPE_HEIGHT*4.0f)) + 0.5f); + v->scopeVolume = (int16_t)(int32_t)((ch->fFinalVol * (SCOPE_HEIGHT*512)) + 0.5f); } if (status & CS_UPDATE_PAN) @@ -397,7 +397,7 @@ for (uint32_t i = 0; i < sampleBlockLength; i++) { // left channel - 1-bit triangular dithering - fPrng = (float)random32() * (1.0f / ((float)UINT32_MAX+1.0f)); // -0.5f .. 0.5f + fPrng = (float)random32() * (float)(1.0 / (UINT32_MAX+1.0)); // -0.5f .. 0.5f fOut = audio.fMixBufferL[i] * fAudioNormalizeMul; fOut = (fOut + fPrng) - fPrngStateL; fPrngStateL = fPrng; @@ -405,7 +405,7 @@ *streamPtr16++ = (int16_t)(CLAMP(out32, INT16_MIN, INT16_MAX)); // right channel - 1-bit triangular dithering - fPrng = (float)random32() * (1.0f / ((float)UINT32_MAX+1.0f)); // -0.5f .. 0.5f + fPrng = (float)random32() * (float)(1.0 / (UINT32_MAX+1.0)); // -0.5f .. 0.5f fOut = audio.fMixBufferR[i] * fAudioNormalizeMul; fOut = (fOut + fPrng) - fPrngStateR; fPrngStateR = fPrng; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/ft2_audio.h new/ft2-clone-2.27/src/ft2_audio.h --- old/ft2-clone-2.26.1/src/ft2_audio.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/ft2_audio.h 2026-10-25 15:23:06.000000000 +0100 @@ -61,7 +61,8 @@ const int8_t *base8, *revBase8; const int16_t *base16, *revBase16; bool active, samplingBackwards, isFadeOutVoice, hasLooped; - uint8_t scopeVolume, mixFuncOffset, panning, loopType; + uint8_t mixFuncOffset, panning, loopType; + int16_t scopeVolume; int32_t position, sampleEnd, loopStart, loopLength; uint32_t volumeRampLength; uint64_t positionFrac, delta, scopeDelta; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/ft2_diskop.c new/ft2-clone-2.27/src/ft2_diskop.c --- old/ft2-clone-2.26.1/src/ft2_diskop.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/ft2_diskop.c 2026-10-25 15:23:06.000000000 +0100 @@ -1333,8 +1333,7 @@ if (!_stricmp("xi", extPtr)) break; - if (!sampleExtensionAccepted(extPtr)) - goto skipEntry; + goto skipEntry; } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/ft2_header.h new/ft2-clone-2.27/src/ft2_header.h --- old/ft2-clone-2.26.1/src/ft2_header.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/ft2_header.h 2026-10-25 15:23:06.000000000 +0100 @@ -14,7 +14,7 @@ #endif #include "ft2_replayer.h" -#define PROG_VER_STR "2.26" +#define PROG_VER_STR "2.27" // do NOT change these! It will only mess things up... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/ft2_replayer.h new/ft2-clone-2.27/src/ft2_replayer.h --- old/ft2-clone-2.26.1/src/ft2_replayer.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/ft2_replayer.h 2026-10-25 15:23:06.000000000 +0100 @@ -197,7 +197,8 @@ typedef struct syncedChannel_t // used for audio/video sync queue (pack to save RAM) { - uint8_t status, pianoNoteNum, smpNum, instrNum, scopeVolume; + uint8_t status, pianoNoteNum, smpNum, instrNum; + int16_t scopeVolume; uint16_t period; int32_t smpStartPos; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/mixer/ft2_mix_macros.h new/ft2-clone-2.27/src/mixer/ft2_mix_macros.h --- old/ft2-clone-2.26.1/src/mixer/ft2_mix_macros.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/mixer/ft2_mix_macros.h 2026-10-25 15:23:06.000000000 +0100 @@ -106,8 +106,8 @@ #define LINEAR_INTERPOLATION(s, f, scale) \ { \ - const int32_t frac24 = (uint32_t)f >> (MIXER_FRAC_BITS-24); \ - const float t = (float)frac24 * (1.0f / (1 << 24)); \ + const int32_t frac31 = (uint32_t)f >> (MIXER_FRAC_BITS-31); \ + const float t = (float)frac31 * (float)(1.0 / (INT32_MAX+1.0)); \ \ const float s1 = s[0]; \ const float s2 = s[1]; \ @@ -132,8 +132,8 @@ #define QUADRATIC_SPLINE_INTERPOLATION(s, f, scale) \ { \ - const int32_t frac24 = (uint32_t)f >> (MIXER_FRAC_BITS-24); \ - const float t = (float)frac24 * (1.0f / (1 << 24)); \ + const int32_t frac31 = (uint32_t)f >> (MIXER_FRAC_BITS-31); \ + const float t = (float)frac31 * (float)(1.0 / (INT32_MAX+1.0)); \ \ const float s1 = s[-1]; \ const float s2 = s[0]; \ @@ -179,8 +179,8 @@ // Catmull-Rom algorithm #define CUBIC_SPLINE_INTERPOLATION(s, f, scale) \ { \ - const int32_t frac24 = (uint32_t)f >> (MIXER_FRAC_BITS-24); \ - const float t = (float)frac24 * (1.0f / (1 << 24)); \ + const int32_t frac31 = (uint32_t)f >> (MIXER_FRAC_BITS-31); \ + const float t = (float)frac31 * (float)(1.0 / (INT32_MAX+1.0)); \ \ const float s1 = s[-1]; \ const float s2 = s[0]; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/scopes/ft2_scope_macros.h new/ft2-clone-2.27/src/scopes/ft2_scope_macros.h --- old/ft2-clone-2.26.1/src/scopes/ft2_scope_macros.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/scopes/ft2_scope_macros.h 2026-10-25 15:23:06.000000000 +0100 @@ -43,50 +43,52 @@ sample = s16[0]; \ } -#define LINEAR_INTERPOLATION8(frac) \ -{ \ - const int32_t f = (uint32_t)(frac) >> (SCOPE_FRAC_BITS-15); \ - sample = (s8[0] << 8) + ((((s8[1] - s8[0]) << 8) * f) >> 15); \ -} +// linear interpolation -#define LINEAR_INTERPOLATION16(frac) \ +#define LINEAR_INTERPOLATION(smp1, smp2, frac) \ { \ - const int32_t f = (uint32_t)(frac) >> (SCOPE_FRAC_BITS-15); \ - sample = s16[0] + (((s16[1] - s16[0]) * f) >> 15); \ + const int32_t frac15 = (uint32_t)(frac) >> (SCOPE_FRAC_BITS-15); \ + const int32_t s1 = smp1, s2 = smp2; \ + \ + sample = s1 + (((s2 - s1) * frac15) >> 15); \ } -#define CUBIC_BSPLINE_SMP8(frac) \ - const int16_t *t = scopeIntrpLUT + (((uint32_t)(frac) >> (SCOPE_FRAC_BITS-SCOPE_INTRP_PHASES_BITS)) << SCOPE_INTRP_WIDTH_BITS); \ - \ - sample = ((s8[-1] * t[0]) + \ - ( s8[0] * t[1]) + \ - ( s8[1] * t[2]) + \ - ( s8[2] * t[3])) >> (SCOPE_INTRP_SCALE_BITS-8); - -#define CUBIC_BSPLINE_SMP16(frac) \ - const int16_t *t = scopeIntrpLUT + (((uint32_t)(frac) >> (SCOPE_FRAC_BITS-SCOPE_INTRP_PHASES_BITS)) << SCOPE_INTRP_WIDTH_BITS); \ - \ - sample = ((s16[-1] * t[0]) + \ - ( s16[0] * t[1]) + \ - ( s16[1] * t[2]) + \ - ( s16[2] * t[3])) >> SCOPE_INTRP_SCALE_BITS; +#define LINEAR_INTERPOLATION8(frac) LINEAR_INTERPOLATION(s8[0] << 8, s8[1] << 8, frac) +#define LINEAR_INTERPOLATION16(frac) LINEAR_INTERPOLATION(s16[0], s16[1], frac) -#define CUBIC_BSPLINE_INTERPOLATION8(frac) \ -{ \ - CUBIC_BSPLINE_SMP8(frac) \ -} \ +/* 4-point cubic B-spline interpolation (32 phases with interpolation between them). +** The LUT has an extra inverted phase at the end for interpolation wrap-around. +*/ + +#define CUBIC_BSPLINE_INTERPOLATION(data, shift, frac) \ +{ \ + const uint32_t fracReduced = (uint32_t)(frac) >> (SCOPE_FRAC_BITS-INTRP_BITS); \ + const uint32_t phaseInt5 = fracReduced >> INTRP_PHASE_SHIFT; \ + const int32_t phaseFrac15 = fracReduced & INTRP_PHASE_MASK; \ + const int16_t *t = scopeIntrpLUT + (phaseInt5 << SCOPE_INTRP_WIDTH_BITS); \ + \ + const int32_t s1 = ((data[-1] * t[0]) + \ + ( data[0] * t[1]) + \ + ( data[1] * t[2]) + \ + ( data[2] * t[3])) >> (shift); \ + \ + const int32_t s2 = ((data[-1] * t[SCOPE_INTRP_WIDTH+0]) + \ + ( data[0] * t[SCOPE_INTRP_WIDTH+1]) + \ + ( data[1] * t[SCOPE_INTRP_WIDTH+2]) + \ + ( data[2] * t[SCOPE_INTRP_WIDTH+3])) >> (shift); \ + \ + sample = s1 + (((s2 - s1) * phaseFrac15) >> INTRP_PHASE_SHIFT); \ +} -#define CUBIC_BSPLINE_INTERPOLATION16(frac) \ -{ \ - CUBIC_BSPLINE_SMP16(frac) \ -} \ +#define CUBIC_BSPLINE_INTERPOLATION8(frac) CUBIC_BSPLINE_INTERPOLATION(s8, SCOPE_INTRP_SCALE_BITS-8, frac) +#define CUBIC_BSPLINE_INTERPOLATION16(frac) CUBIC_BSPLINE_INTERPOLATION(s16, SCOPE_INTRP_SCALE_BITS, frac) #define CUBIC_BSPLINE_INTERPOLATION8_LOOP(pos, frac) \ { \ if (s->hasLooped && pos <= s->loopStart+MAX_LEFT_TAPS) \ s8 = s->leftEdgeTaps8 + (pos - s->loopStart); \ \ - CUBIC_BSPLINE_SMP8(frac) \ + CUBIC_BSPLINE_INTERPOLATION(s8, SCOPE_INTRP_SCALE_BITS-8, frac) \ } \ #define CUBIC_BSPLINE_INTERPOLATION16_LOOP(pos, frac) \ @@ -94,7 +96,7 @@ if (s->hasLooped && pos <= s->loopStart+MAX_LEFT_TAPS) \ s16 = s->leftEdgeTaps16 + (pos - s->loopStart); \ \ - CUBIC_BSPLINE_SMP16(frac) \ + CUBIC_BSPLINE_INTERPOLATION(s16, SCOPE_INTRP_SCALE_BITS, frac) \ } \ #define INTERPOLATE_SMP8(pos, frac) \ @@ -105,7 +107,7 @@ LINEAR_INTERPOLATION8(frac) \ else \ CUBIC_BSPLINE_INTERPOLATION8(frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (sample * s->volume) >> (16+9); #define INTERPOLATE_SMP16(pos, frac) \ const int16_t *s16 = s->base16 + pos; \ @@ -115,7 +117,7 @@ LINEAR_INTERPOLATION16(frac) \ else \ CUBIC_BSPLINE_INTERPOLATION16(frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (sample * s->volume) >> (16+9); #define INTERPOLATE_SMP8_LOOP(pos, frac) \ const int8_t *s8 = s->base8 + pos; \ @@ -125,7 +127,7 @@ LINEAR_INTERPOLATION8(frac) \ else \ CUBIC_BSPLINE_INTERPOLATION8_LOOP(pos, frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (sample * s->volume) >> (16+9); #define INTERPOLATE_SMP16_LOOP(pos, frac) \ const int16_t *s16 = s->base16 + pos; \ @@ -135,17 +137,17 @@ LINEAR_INTERPOLATION16(frac) \ else \ CUBIC_BSPLINE_INTERPOLATION16_LOOP(pos, frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (sample * s->volume) >> (16+9); #define SCOPE_GET_SMP8 \ if (s->active) \ - sample = (s->base8[position] * s->volume) >> (8+2); \ + sample = (s->base8[position] * s->volume) >> (8+9); \ else \ sample = 0; #define SCOPE_GET_SMP16 \ if (s->active) \ - sample = (s->base16[position] * s->volume) >> (16+2); \ + sample = (s->base16[position] * s->volume) >> (16+9); \ else \ sample = 0; @@ -153,7 +155,7 @@ if (s->active) \ { \ GET_PINGPONG_POSITION \ - sample = (s->base8[actualPos] * s->volume) >> (8+2); \ + sample = (s->base8[actualPos] * s->volume) >> (8+9); \ } \ else \ { \ @@ -164,7 +166,7 @@ if (s->active) \ { \ GET_PINGPONG_POSITION \ - sample = (s->base16[actualPos] * s->volume) >> (16+2); \ + sample = (s->base16[actualPos] * s->volume) >> (16+9); \ } \ else \ { \ @@ -221,7 +223,7 @@ if (s->active) \ { \ GET_PINGPONG_POSITION \ - INTERPOLATE_SMP8_LOOP(actualPos, samplingBackwards ? ((uint32_t)positionFrac ^ SCOPE_FRAC_MASK) : (uint32_t)positionFrac) \ + INTERPOLATE_SMP8_LOOP(actualPos, samplingBackwards ? ((uint32_t)positionFrac ^ (uint32_t)SCOPE_FRAC_MASK) : (uint32_t)positionFrac) \ } \ else \ { \ @@ -232,7 +234,7 @@ if (s->active) \ { \ GET_PINGPONG_POSITION \ - INTERPOLATE_SMP16_LOOP(actualPos, samplingBackwards ? ((uint32_t)positionFrac ^ SCOPE_FRAC_MASK) : (uint32_t)positionFrac) \ + INTERPOLATE_SMP16_LOOP(actualPos, samplingBackwards ? ((uint32_t)positionFrac ^ (uint32_t)SCOPE_FRAC_MASK) : (uint32_t)positionFrac) \ } \ else \ { \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/scopes/ft2_scopedraw.c new/ft2-clone-2.27/src/scopes/ft2_scopedraw.c --- old/ft2-clone-2.26.1/src/scopes/ft2_scopedraw.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/scopes/ft2_scopedraw.c 2026-10-25 15:23:06.000000000 +0100 @@ -8,75 +8,61 @@ #include "ft2_scopedraw.h" #include "ft2_scope_macros.h" -/* 4-point cubic B-spline interpolation LUT with 128 phases. No overshoot. -** Used on the scopes when using quadratic/cubic/sinc mixing interpolation. -*/ -static const int16_t scopeIntrpLUT[SCOPE_INTRP_WIDTH * SCOPE_INTRP_PHASES] = +/* 4-point cubic B-spline (no overshoot) interpolation LUT (32 phases). +** Used on the scopes when using quadratic/cubic/sinc mixing interpolation, +** together with linear interpolation between the phases in the LUT. +** +** ----------------- C code for making LUT (has unity gain) ---------------- +** #define SCALE 32768 +** #define PHASES 32 +** for (int32_t i = 0; i < PHASES; i++) +** { +** double t1 = i / (double)PHASES, t2 = t1 * t1, t3 = t2 * t1; +** double a = SCALE * ((1.0 - 3.0*t1 + 3.0*t2 - t3) / 6.0); +** double b = SCALE * ((4.0 - 6.0*t2 + 3.0*t3) / 6.0); +** double c = SCALE * ((1.0 + 3.0*t1 + 3.0*t2 - 3.0*t3) / 6.0); +** double d = SCALE * (t3 / 6.0); +** printf("%d, %d, %d, %d,\n", (int32_t)a, (int32_t)b, (int32_t)c, (int32_t)d); +** } +** printf("%d, %d, %d, %d // inverted copy of first phase (for interpolation)\n", +** 0, (int32_t)(SCALE * (1.0 / 6.0)), (int32_t)(SCALE * (4.0 / 6.0)), +** (int32_t)(SCALE * (1.0 / 6.0))); +** ------------------------------------------------------------------------- */ +static const int16_t scopeIntrpLUT[SCOPE_INTRP_WIDTH * (SCOPE_INTRP_PHASES+1)] = { - 5461, 21845, 5461, 0, 5334, 21843, 5590, 0, - 5209, 21837, 5721, 0, 5086, 21827, 5854, 0, - 4965, 21813, 5988, 0, 4846, 21796, 6125, 0, - 4728, 21775, 6263, 0, 4613, 21750, 6403, 0, - 4500, 21721, 6545, 1, 4388, 21689, 6688, 1, - 4278, 21653, 6833, 2, 4170, 21613, 6979, 3, - 4064, 21570, 7127, 4, 3960, 21524, 7277, 5, - 3858, 21474, 7427, 7, 3757, 21421, 7579, 8, - 3658, 21365, 7733, 10, 3561, 21305, 7887, 12, - 3466, 21242, 8043, 15, 3372, 21176, 8200, 17, - 3280, 21107, 8358, 20, 3190, 21035, 8517, 24, - 3101, 20960, 8678, 27, 3014, 20882, 8839, 31, - 2929, 20801, 9001, 36, 2845, 20717, 9164, 40, - 2763, 20630, 9328, 45, 2683, 20541, 9492, 51, - 2604, 20448, 9657, 57, 2526, 20353, 9823, 63, - 2451, 20256, 9990, 70, 2376, 20156, 10157, 77, - 2304, 20053, 10325, 85, 2232, 19948, 10493, 93, - 2162, 19840, 10662, 102, 2094, 19730, 10831, 111, - 2027, 19617, 11000, 121, 1962, 19503, 11170, 131, - 1898, 19386, 11340, 142, 1835, 19266, 11510, 154, - 1774, 19145, 11681, 166, 1714, 19021, 11851, 179, - 1656, 18896, 12022, 192, 1599, 18768, 12193, 207, - 1543, 18638, 12363, 221, 1489, 18507, 12534, 237, - 1435, 18373, 12704, 253, 1383, 18238, 12875, 270, - 1333, 18101, 13045, 288, 1283, 17962, 13215, 306, - 1235, 17821, 13384, 325, 1188, 17679, 13553, 345, - 1143, 17535, 13722, 366, 1098, 17390, 13891, 387, - 1055, 17243, 14059, 410, 1013, 17095, 14226, 433, - 972, 16945, 14393, 457, 932, 16794, 14559, 482, - 893, 16641, 14725, 508, 855, 16487, 14889, 534, - 818, 16332, 15053, 562, 783, 16176, 15217, 591, - 748, 16019, 15379, 620, 715, 15860, 15540, 651, - 682, 15701, 15701, 682, 651, 15540, 15860, 715, - 620, 15379, 16019, 748, 591, 15217, 16176, 783, - 562, 15053, 16332, 818, 534, 14889, 16487, 855, - 508, 14725, 16641, 893, 482, 14559, 16794, 932, - 457, 14393, 16945, 972, 433, 14226, 17095, 1013, - 410, 14059, 17243, 1055, 387, 13891, 17390, 1098, - 366, 13722, 17535, 1143, 345, 13553, 17679, 1188, - 325, 13384, 17821, 1235, 306, 13215, 17962, 1283, - 288, 13045, 18101, 1333, 270, 12875, 18238, 1383, - 253, 12704, 18373, 1435, 237, 12534, 18507, 1489, - 221, 12363, 18638, 1543, 207, 12193, 18768, 1599, - 192, 12022, 18896, 1656, 179, 11851, 19021, 1714, - 166, 11681, 19145, 1774, 154, 11510, 19266, 1835, - 142, 11340, 19386, 1898, 131, 11170, 19503, 1962, - 121, 11000, 19617, 2027, 111, 10831, 19730, 2094, - 102, 10662, 19840, 2162, 93, 10493, 19948, 2232, - 85, 10325, 20053, 2304, 77, 10157, 20156, 2376, - 70, 9990, 20256, 2451, 63, 9823, 20353, 2526, - 57, 9657, 20448, 2604, 51, 9492, 20541, 2683, - 45, 9328, 20630, 2763, 40, 9164, 20717, 2845, - 36, 9001, 20801, 2929, 31, 8839, 20882, 3014, - 27, 8678, 20960, 3101, 24, 8517, 21035, 3190, - 20, 8358, 21107, 3280, 17, 8200, 21176, 3372, - 15, 8043, 21242, 3466, 12, 7887, 21305, 3561, - 10, 7733, 21365, 3658, 8, 7579, 21421, 3757, - 7, 7427, 21474, 3858, 5, 7277, 21524, 3960, - 4, 7127, 21570, 4064, 3, 6979, 21613, 4170, - 2, 6833, 21653, 4278, 1, 6688, 21689, 4388, - 1, 6545, 21721, 4500, 0, 6403, 21750, 4613, - 0, 6263, 21775, 4728, 0, 6125, 21796, 4846, - 0, 5988, 21813, 4965, 0, 5854, 21827, 5086, - 0, 5721, 21837, 5209, 0, 5590, 21843, 5334 + 5461, 21845, 5461, 0, + 4965, 21813, 5988, 0, + 4500, 21721, 6545, 1, + 4064, 21570, 7127, 4, + 3658, 21365, 7733, 10, + 3280, 21107, 8358, 20, + 2929, 20801, 9001, 36, + 2604, 20448, 9657, 57, + 2304, 20053, 10325, 85, + 2027, 19617, 11000, 121, + 1774, 19145, 11681, 166, + 1543, 18638, 12363, 221, + 1333, 18101, 13045, 288, + 1143, 17535, 13722, 366, + 972, 16945, 14393, 457, + 818, 16332, 15053, 562, + 682, 15701, 15701, 682, + 562, 15053, 16332, 818, + 457, 14393, 16945, 972, + 366, 13722, 17535, 1143, + 288, 13045, 18101, 1333, + 221, 12363, 18638, 1543, + 166, 11681, 19145, 1774, + 121, 11000, 19617, 2027, + 85, 10325, 20053, 2304, + 57, 9657, 20448, 2604, + 36, 9001, 20801, 2929, + 20, 8358, 21107, 3280, + 10, 7733, 21365, 3658, + 4, 7127, 21570, 4064, + 1, 6545, 21721, 4500, + 0, 5988, 21813, 4965, + 0, 5461, 21845, 5461 // inverted copy of first phase (for interpolation) }; static void scopeLine(int32_t x1, int32_t y1, int32_t y2, const uint32_t color); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/scopes/ft2_scopedraw.h new/ft2-clone-2.27/src/scopes/ft2_scopedraw.h --- old/ft2-clone-2.26.1/src/scopes/ft2_scopedraw.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/scopes/ft2_scopedraw.h 2026-10-25 15:23:06.000000000 +0100 @@ -6,4 +6,3 @@ typedef void (*scopeDrawRoutine)(const scope_t *, uint32_t, uint32_t, uint32_t); extern const scopeDrawRoutine scopeDrawRoutineTable[12]; // ft2_scopedraw.c - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/scopes/ft2_scopes.c new/ft2-clone-2.27/src/scopes/ft2_scopes.c --- old/ft2-clone-2.26.1/src/scopes/ft2_scopes.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/scopes/ft2_scopes.c 2026-10-25 15:23:06.000000000 +0100 @@ -482,6 +482,7 @@ void handleScopesFromChQueue(chSyncData_t *chSyncData, uint8_t *scopeUpdateStatus) { volatile scope_t *sc = scope; + syncedChannel_t *ch = chSyncData->channels; for (int32_t i = 0; i < song.numChannels; i++, sc++, ch++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/scopes/ft2_scopes.h new/ft2-clone-2.27/src/scopes/ft2_scopes.h --- old/ft2-clone-2.26.1/src/scopes/ft2_scopes.h 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/scopes/ft2_scopes.h 2026-10-25 15:23:06.000000000 +0100 @@ -20,8 +20,12 @@ #define SCOPE_INTRP_WIDTH 4 #define SCOPE_INTRP_WIDTH_BITS 2 /* log2(SCOPE_INTRP_WIDTH) */ #define SCOPE_INTRP_SCALE_BITS 15 -#define SCOPE_INTRP_PHASES 128 /* good enough */ -#define SCOPE_INTRP_PHASES_BITS 7 /* log2(SCOPE_INTRP_PHASES) */ +#define SCOPE_INTRP_PHASES 32 /* good enough */ +#define SCOPE_INTRP_PHASES_BITS 5 /* log2(SCOPE_INTRP_PHASES) */ + +#define INTRP_BITS (15+SCOPE_INTRP_PHASES_BITS) +#define INTRP_PHASE_SHIFT (INTRP_BITS-SCOPE_INTRP_PHASES_BITS) +#define INTRP_PHASE_MASK ((1 << INTRP_PHASE_SHIFT)-1) int32_t getSamplePositionFromScopes(uint8_t ch); void stopAllScopes(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_aiff.c new/ft2-clone-2.27/src/smploaders/ft2_load_aiff.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_aiff.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_aiff.c 2026-10-25 15:23:06.000000000 +0100 @@ -5,6 +5,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> @@ -152,7 +157,7 @@ if (aiffIsStereo(f)) { stereoAction = loaderSysReq(4, "System request", "This is a stereo sample. Which channel do you want to read?", NULL); - setMouseBusy(true); + setMouseBusy(true); // kludge } // read sample data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_brr.c new/ft2-clone-2.27/src/smploaders/ft2_load_brr.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_brr.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_brr.c 2026-10-25 15:23:06.000000000 +0100 @@ -5,6 +5,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_flac.c new/ft2-clone-2.27/src/smploaders/ft2_load_flac.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_flac.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_flac.c 2026-10-25 15:23:06.000000000 +0100 @@ -5,6 +5,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> @@ -188,7 +193,7 @@ if (numChannels == 2) { stereoAction = loaderSysReq(4, "System request", "This is a stereo sample. Which channel do you want to read?", NULL); - setMouseBusy(true); + setMouseBusy(true); // kludge } bool sample16Bit = (bitDepth >= 16); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_iff.c new/ft2-clone-2.27/src/smploaders/ft2_load_iff.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_iff.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_iff.c 2026-10-25 15:23:06.000000000 +0100 @@ -8,6 +8,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_mp3.c new/ft2-clone-2.27/src/smploaders/ft2_load_mp3.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_mp3.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_mp3.c 2026-10-25 15:23:06.000000000 +0100 @@ -5,6 +5,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> @@ -100,7 +105,7 @@ if (mp3IsStereo) { stereoAction = loaderSysReq(4, "System request", "This is a stereo sample. Which channel do you want to read?", NULL); - setMouseBusy(true); + setMouseBusy(true); // kludge } if (fread(buf, 1, filesize, f) != filesize) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_ogg.c new/ft2-clone-2.27/src/smploaders/ft2_load_ogg.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_ogg.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_ogg.c 2026-10-25 15:23:06.000000000 +0100 @@ -5,6 +5,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> @@ -23,6 +28,7 @@ #define VORBIS_IMPL #include "minivorbis.h" #else +#pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wunknown-warning-option" @@ -74,7 +80,7 @@ OggVorbis_File vorbis; sample_t *s = &tmpSmp; - if (ov_open_callbacks(f, &vorbis, NULL, 0, OV_CALLBACKS_DEFAULT) != 0) + if (ov_open_callbacks(f, &vorbis, NULL, 0, OV_CALLBACKS_NOCLOSE) != 0) { loaderMsgBox("Error loading sample: The sample is empty or corrupt!"); return false; @@ -93,6 +99,7 @@ uint8_t *smpBuffer = (uint8_t *)malloc(SAMPLE_BUFFER_SIZE); if (smpBuffer == NULL) { + ov_clear(&vorbis); loaderMsgBox("Not enough memory!"); return false; } @@ -101,7 +108,7 @@ if (numChannels == 2) { stereoAction = loaderSysReq(4, "System request", "This is a stereo sample. Which channel do you want to read?", NULL); - setMouseBusy(true); + setMouseBusy(true); // kludge } const int32_t shift = (numChannels == 2) ? 2 : 1; @@ -124,8 +131,8 @@ int32_t numSamples = sampleCounter >> shift; if (!reallocateSmpData(s, sampleLength + numSamples, true)) { - free(smpBuffer); ov_clear(&vorbis); + free(smpBuffer); loaderMsgBox("Not enough memory!"); return false; } @@ -165,8 +172,8 @@ break; } - free(smpBuffer); ov_clear(&vorbis); + free(smpBuffer); s->length = sampleLength; s->volume = 64; @@ -175,6 +182,4 @@ setSampleC4Hz(s, sampleRate); return true; - - (void)filesize; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_raw.c new/ft2-clone-2.27/src/smploaders/ft2_load_raw.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_raw.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_raw.c 2026-10-25 15:23:06.000000000 +0100 @@ -3,6 +3,11 @@ ** Note: Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.26.1/src/smploaders/ft2_load_wav.c new/ft2-clone-2.27/src/smploaders/ft2_load_wav.c --- old/ft2-clone-2.26.1/src/smploaders/ft2_load_wav.c 2026-10-15 18:20:11.000000000 +0200 +++ new/ft2-clone-2.27/src/smploaders/ft2_load_wav.c 2026-10-25 15:23:06.000000000 +0100 @@ -5,6 +5,11 @@ ** Do NOT close the file handle! */ +// for finding memory leaks in debug mode with Visual Studio +#if defined _DEBUG && defined _MSC_VER +#include <crtdbg.h> +#endif + #include <stdio.h> #include <stdint.h> #include <stdbool.h> @@ -190,7 +195,7 @@ if (wavIsStereo(f)) { stereoAction = loaderSysReq(4, "System request", "This is a stereo sample. Which channel do you want to read?", NULL); - setMouseBusy(true); + setMouseBusy(true); // kludge } if (bitsPerSample == 8) // 8-BIT INTEGER SAMPLE
