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 2025-07-15 16:45:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ft2-clone (Old) and /work/SRC/openSUSE:Factory/.ft2-clone.new.7373 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ft2-clone" Tue Jul 15 16:45:47 2025 rev:25 rq:1293280 version:1.97 Changes: -------- --- /work/SRC/openSUSE:Factory/ft2-clone/ft2-clone.changes 2025-05-22 16:57:14.486867417 +0200 +++ /work/SRC/openSUSE:Factory/.ft2-clone.new.7373/ft2-clone.changes 2025-07-15 16:47:10.195848205 +0200 @@ -1,0 +2,7 @@ +Sun Jul 13 17:52:40 UTC 2025 - Martin Hauke <mar...@gmx.de> + +- Update to version 1.97 + * Improved the tracker scopes interpolation a little bit. + More smooth in some cases, but barely noticable. + +------------------------------------------------------------------- Old: ---- ft2-clone-1.96.tar.gz New: ---- ft2-clone-1.97.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ft2-clone.spec ++++++ --- /var/tmp/diff_new_pack.wC1aLP/_old 2025-07-15 16:47:11.039883161 +0200 +++ /var/tmp/diff_new_pack.wC1aLP/_new 2025-07-15 16:47:11.043883326 +0200 @@ -17,7 +17,7 @@ Name: ft2-clone -Version: 1.96 +Version: 1.97 Release: 0 Summary: Fasttracker II clone License: BSD-3-Clause AND CC-BY-NC-SA-4.0 ++++++ ft2-clone-1.96.tar.gz -> ft2-clone-1.97.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h --- old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h 2025-07-13 16:46:26.000000000 +0200 @@ -750,8 +750,12 @@ size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); #endif +#ifndef _WIN32 /* strdup is not ANSI but POSIX, and its prototype might be hidden... */ +/* not for windows: might conflict with string.h where strdup may have + * dllimport attribute: https://github.com/libsdl-org/SDL/issues/12948 */ char *strdup(const char *str); +#endif /* Starting LLVM 16, the analyser errors out if these functions do not have their prototype defined (clang-diagnostic-implicit-function-declaration) */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h --- old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h 2025-07-13 16:46:26.000000000 +0200 @@ -58,7 +58,7 @@ */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 32 -#define SDL_PATCHLEVEL 6 +#define SDL_PATCHLEVEL 8 /** * Macro to determine SDL version program was compiled against. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist --- old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist 2025-07-13 16:46:26.000000000 +0200 @@ -19,7 +19,7 @@ <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> - <string>2.32.6</string> + <string>2.32.8</string> <key>CFBundleSignature</key> <string>SDLX</string> <key>CFBundleSupportedPlatforms</key> @@ -27,7 +27,7 @@ <string>MacOSX</string> </array> <key>CFBundleVersion</key> - <string>2.32.6</string> + <string>2.32.8</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> Binary files old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 and new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources --- old/ft2-clone-1.96/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources 2025-07-13 16:46:26.000000000 +0200 @@ -14,7 +14,7 @@ </data> <key>Resources/Info.plist</key> <data> - Zda7B5zOlgXIAj0SZw10DI8J4zY= + k6iPRu83txomCVW2hkW4G2hDQ1g= </data> <key>Resources/License.txt</key> <data> @@ -618,11 +618,11 @@ <dict> <key>hash</key> <data> - ghpA/MCplmhdO4hJb25EXKh4+s4= + MR36Ou7QO+u+7GznVL3XNQ8tJbw= </data> <key>hash2</key> <data> - cSrXM8EyC4v/PujaxFfax4TvFm2zt24dFebf53otApM= + MlrCfUryuPhjND16ZreSOSgu23XpXPQbhIDbuAfgvTQ= </data> </dict> <key>Headers/SDL_surface.h</key> @@ -706,11 +706,11 @@ <dict> <key>hash</key> <data> - gPL2qjhQt9pswRR/UrpHYP61KNo= + 1l8NdLTxUdejo0BJoaYzT26luPQ= </data> <key>hash2</key> <data> - 5wMLgwuCEV//z0Hwsvs0UIsP9NcnMIH4jtOo6pMgtLE= + S02B7eMdA0fmMGpiGOIFLSZkg8u0igKOQ1KpNe5PWCw= </data> </dict> <key>Headers/SDL_video.h</key> @@ -783,11 +783,11 @@ <dict> <key>hash</key> <data> - Zda7B5zOlgXIAj0SZw10DI8J4zY= + k6iPRu83txomCVW2hkW4G2hDQ1g= </data> <key>hash2</key> <data> - tmWhV3TAUQkq3CfjDOIa/2S0mjQq6mtKeD/TSdsmAwo= + BLH2X9CVHV4dezVVV5zrhFtDj3SOR9eDAiaypqvMaL4= </data> </dict> <key>Resources/License.txt</key> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/release/other/.gitignore new/ft2-clone-1.97/release/other/.gitignore --- old/ft2-clone-1.96/release/other/.gitignore 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/release/other/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/ft2-clone-1.96/release/other/Freedesktop.org Resources/Fasttracker II clone.desktop" "new/ft2-clone-1.97/release/other/Freedesktop.org Resources/Fasttracker II clone.desktop" --- "old/ft2-clone-1.96/release/other/Freedesktop.org Resources/Fasttracker II clone.desktop" 1970-01-01 01:00:00.000000000 +0100 +++ "new/ft2-clone-1.97/release/other/Freedesktop.org Resources/Fasttracker II clone.desktop" 2025-07-13 16:46:26.000000000 +0200 @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Fasttracker II clone +Comment= +Exec=ft2-clone +Icon=Fasttracker II clone +Path= +Terminal=false +StartupNotify=false +Categories=AudioVideo;Audio;AudioVideoEditing;Sequencer; Binary files old/ft2-clone-1.96/release/other/Freedesktop.org Resources/Fasttracker II clone.png and new/ft2-clone-1.97/release/other/Freedesktop.org Resources/Fasttracker II clone.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/ft2-clone-1.96/release/other/Freedesktop.org Resources/LICENSE" "new/ft2-clone-1.97/release/other/Freedesktop.org Resources/LICENSE" --- "old/ft2-clone-1.96/release/other/Freedesktop.org Resources/LICENSE" 1970-01-01 01:00:00.000000000 +0100 +++ "new/ft2-clone-1.97/release/other/Freedesktop.org Resources/LICENSE" 2025-07-13 16:46:26.000000000 +0200 @@ -0,0 +1,8 @@ +Copyright (c) 2022 Pär Moberg. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Binary files old/ft2-clone-1.96/release/win32/SDL2.dll and new/ft2-clone-1.97/release/win32/SDL2.dll differ Binary files old/ft2-clone-1.96/release/win64/SDL2.dll and new/ft2-clone-1.97/release/win64/SDL2.dll differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/ft2_audio.c new/ft2-clone-1.97/src/ft2_audio.c --- old/ft2-clone-1.96/src/ft2_audio.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/ft2_audio.c 2025-07-13 16:46:26.000000000 +0200 @@ -368,7 +368,7 @@ if (status & IS_Vol) { v->fVolume = ch->fFinalVol; // 0.0f .. 1.0f - v->scopeVolume = (uint8_t)((ch->fFinalVol * (SCOPE_HEIGHT*4.0f)) + 0.5f); + v->scopeVolume = (uint8_t)(v->fVolume * 255.0f); } if (status & IS_Pan) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/ft2_header.h new/ft2-clone-1.97/src/ft2_header.h --- old/ft2-clone-1.96/src/ft2_header.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/ft2_header.h 2025-07-13 16:46:26.000000000 +0200 @@ -12,7 +12,7 @@ #endif #include "ft2_replayer.h" -#define PROG_VER_STR "1.96" +#define PROG_VER_STR "1.97" // do NOT change these! It will only mess things up... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/ft2_replayer.c new/ft2-clone-1.97/src/ft2_replayer.c --- old/ft2-clone-1.96/src/ft2_replayer.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/ft2_replayer.c 2025-07-13 16:46:26.000000000 +0200 @@ -663,22 +663,22 @@ static const efxRoutine EJumpTab_TickZero[16] = { - dummy, // 0 + dummy, // 0 finePitchSlideUp, // 1 finePitchSlideDown, // 2 setPortamentoCtrl, // 3 setVibratoCtrl, // 4 - dummy, // 5 + dummy, // 5 patternLoop, // 6 setTremoloCtrl, // 7 - dummy, // 8 - dummy, // 9 + dummy, // 8 + dummy, // 9 fineVolSlideUp, // A fineVolFineDown, // B - noteCut0, // C - dummy, // D + noteCut0, // C + dummy, // D patternDelay, // E - dummy // F + dummy // F }; static void E_Effects_TickZero(channel_t *ch, uint8_t param) @@ -688,8 +688,10 @@ if (ch->channelOff) // channel is muted, only handle certain E effects { - if (efx == 0x6) patternLoop(ch, param); - else if (efx == 0xE) patternDelay(ch, param); + if (efx == 0x6) + patternLoop(ch, param); + else if (efx == 0xE) + patternDelay(ch, param); return; } @@ -907,42 +909,42 @@ static const efxRoutine JumpTab_TickZero[36] = { - dummy, // 0 - dummy, // 1 - dummy, // 2 - dummy, // 3 - dummy, // 4 - dummy, // 5 - dummy, // 6 - dummy, // 7 - dummy, // 8 - dummy, // 9 - dummy, // A + dummy, // 0 + dummy, // 1 + dummy, // 2 + dummy, // 3 + dummy, // 4 + dummy, // 5 + dummy, // 6 + dummy, // 7 + dummy, // 8 + dummy, // 9 + dummy, // A positionJump, // B - dummy, // C + dummy, // C patternBreak, // D E_Effects_TickZero, // E - setSpeed, // F + setSpeed, // F setGlobalVolume, // G - dummy, // H - dummy, // I - dummy, // J - dummy, // K + dummy, // H + dummy, // I + dummy, // J + dummy, // K setEnvelopePos, // L - dummy, // M - dummy, // N - dummy, // O - dummy, // P - dummy, // Q - dummy, // R - dummy, // S - dummy, // T - dummy, // U - dummy, // V - dummy, // W - dummy, // X - dummy, // Y - dummy // Z + dummy, // M + dummy, // N + dummy, // O + dummy, // P + dummy, // Q + dummy, // R + dummy, // S + dummy, // T + dummy, // U + dummy, // V + dummy, // W + dummy, // X + dummy, // Y + dummy // Z }; static void handleMoreEffects_TickZero(channel_t *ch) // called even if channel is muted! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/mixer/ft2_cubic_spline.c new/ft2-clone-1.97/src/mixer/ft2_cubic_spline.c --- old/ft2-clone-1.96/src/mixer/ft2_cubic_spline.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/mixer/ft2_cubic_spline.c 2025-07-13 16:46:26.000000000 +0200 @@ -24,38 +24,42 @@ const double x2 = x1 * x1; // x^2 const double x3 = x2 * x1; // x^3 - double t1 = (-0.5 * x3) + ( 1.0 * x2) + (-0.5 * x1); - double t2 = ( 1.5 * x3) + (-2.5 * x2) + 1.0; - double t3 = (-1.5 * x3) + ( 2.0 * x2) + ( 0.5 * x1); - double t4 = ( 0.5 * x3) + (-0.5 * x2); - - *fPtr++ = (float)t1; - *fPtr++ = (float)t2; - *fPtr++ = (float)t3; - *fPtr++ = (float)t4; + const double t1 = (x1 * -0.5) + (x2 * 1.0) + (x3 * -0.5); + const double t2 = (x2 * -2.5) + (x3 * 1.5) + 1.0; + const double t3 = (x1 * 0.5) + (x2 * 2.0) + (x3 * -1.5); + const double t4 = (x2 * -0.5) + (x3 * 0.5); + + *fPtr++ = (float)t1; // tap #1 at sample offset -1 + *fPtr++ = (float)t2; // tap #2 at sample offset 0 (center) + *fPtr++ = (float)t3; // tap #3 at sample offset 1 + *fPtr++ = (float)t4; // tap #4 at sample offset 2 } /* - // 6-point Cubic Hermite (Catmull-Rom) + ** Code for 6-point cubic Hermite spline (Catmull-Rom). + ** May be useful for someone, so I keep it here despite not being used. + */ + + /* for (int32_t i = 0; i < CUBIC_SPLINE_PHASES; i++) { const double x1 = i * (1.0 / CUBIC_SPLINE_PHASES); const double x2 = x1 * x1; // x^2 const double x3 = x2 * x1; // x^3 - double t1 = ( (1.0/12.0) * x3) + (-(1.0/ 6.0) * x2) + ( (1.0/12.0) * x1); - double t2 = (-(7.0/12.0) * x3) + ( (5.0/ 4.0) * x2) + (-(2.0/ 3.0) * x1); - double t3 = ( (4.0/ 3.0) * x3) + (-(7.0/ 3.0) * x2) + 1.0; - double t4 = (-(4.0/ 3.0) * x3) + ( (5.0/ 3.0) * x2) + ( (2.0/ 3.0) * x1); - double t5 = ( (7.0/12.0) * x3) + (-(1.0/ 2.0) * x2) + (-(1.0/12.0) * x1); - double t6 = (-(1.0/12.0) * x3) + ( (1.0/12.0) * x2); - - *fPtr++ = (float)t1; - *fPtr++ = (float)t2; - *fPtr++ = (float)t3; - *fPtr++ = (float)t4; - *fPtr++ = (float)t5; - *fPtr++ = (float)t6; + const double t1 = (x1 * (1.0/12.0)) + (x2 * -(1.0/ 6.0)) + (x3 * (1.0/12.0)); + const double t2 = (x1 * -(2.0/ 3.0)) + (x2 * (5.0/ 4.0)) + (x3 * -(7.0/12.0)); + const double t3 = (x2 * -(7.0/ 3.0)) + (x3 * (4.0/ 3.0)) + 1.0; + const double t4 = (x1 * (2.0/ 3.0)) + (x2 * (5.0/ 3.0)) + (x3 * -(4.0/ 3.0)); + const double t5 = (x1 * -(1.0/12.0)) + (x2 * -(1.0/ 2.0)) + (x3 * (7.0/12.0)); + const double t6 = (x2 * (1.0/12.0)) + (x3 * -(1.0/12.0)); + + *fPtr++ = (float)t1; // tap #1 at sample offset -2 + *fPtr++ = (float)t2; // tap #2 at sample offset -1 + *fPtr++ = (float)t3; // tap #3 at sample offset 0 (center) + *fPtr++ = (float)t4; // tap #4 at sample offset 1 + *fPtr++ = (float)t5; // tap #5 at sample offset 2 + *fPtr++ = (float)t6; // tap #6 at sample offset 3 } */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/mixer/ft2_cubic_spline.h new/ft2-clone-1.97/src/mixer/ft2_cubic_spline.h --- old/ft2-clone-1.96/src/mixer/ft2_cubic_spline.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/mixer/ft2_cubic_spline.h 2025-07-13 16:46:26.000000000 +0200 @@ -7,7 +7,7 @@ #define CUBIC_SPLINE_WIDTH 4 #define CUBIC_SPLINE_WIDTH_BITS 2 /* log2(CUBIC_SPLINE_WIDTH) */ #define CUBIC_SPLINE_PHASES 8192 -#define CUBIC_SPLINE_PHASES_BITS 13 // log2(CUBIC_SPLINE_PHASES) +#define CUBIC_SPLINE_PHASES_BITS 13 /* log2(CUBIC_SPLINE_PHASES) */ #define CUBIC_SPLINE_FRACSHIFT (MIXER_FRAC_BITS-(CUBIC_SPLINE_PHASES_BITS+CUBIC_SPLINE_WIDTH_BITS)) #define CUBIC_SPLINE_FRACMASK ((CUBIC_SPLINE_WIDTH*CUBIC_SPLINE_PHASES)-CUBIC_SPLINE_WIDTH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/mixer/ft2_mix.c new/ft2-clone-1.97/src/mixer/ft2_mix.c --- old/ft2-clone-1.96/src/mixer/ft2_mix.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/mixer/ft2_mix.c 2025-07-13 16:46:26.000000000 +0200 @@ -947,7 +947,6 @@ SET_BACK_MIXER_POS } - static void mix8bRampNoLoop(voice_t *v, uint32_t bufferPos, uint32_t numSamples) { const int8_t *base, *smpPtr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/mixer/ft2_quadratic_spline.c new/ft2-clone-1.97/src/mixer/ft2_quadratic_spline.c --- old/ft2-clone-1.96/src/mixer/ft2_quadratic_spline.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/mixer/ft2_quadratic_spline.c 2025-07-13 16:46:26.000000000 +0200 @@ -23,13 +23,13 @@ const double x1 = i * (1.0 / QUADRATIC_SPLINE_PHASES); const double x2 = x1 * x1; // x^2 - double t1 = ( 0.5 * x2) + (-1.5 * x1) + 1.0; - double t2 = (-1.0 * x2) + ( 2.0 * x1); - double t3 = ( 0.5 * x2) + (-0.5 * x1); + const double t1 = (x1 * -1.5) + (x2 * 0.5) + 1.0; + const double t2 = (x1 * 2.0) + (x2 * -1.0); + const double t3 = (x1 * -0.5) + (x2 * 0.5); - *fPtr++ = (float)t1; - *fPtr++ = (float)t2; - *fPtr++ = (float)t3; + *fPtr++ = (float)t1; // tap #1 at sample offset 0 (center) + *fPtr++ = (float)t2; // tap #2 at sample offset 1 + *fPtr++ = (float)t3; // tap #3 at sample offset 2 } return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/mixer/ft2_quadratic_spline.h new/ft2-clone-1.97/src/mixer/ft2_quadratic_spline.h --- old/ft2-clone-1.96/src/mixer/ft2_quadratic_spline.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/mixer/ft2_quadratic_spline.h 2025-07-13 16:46:26.000000000 +0200 @@ -6,7 +6,7 @@ #define QUADRATIC_SPLINE_WIDTH 3 #define QUADRATIC_SPLINE_PHASES 8192 -#define QUADRATIC_SPLINE_PHASES_BITS 13 // log2(QUADRATIC_SPLINE_PHASES) +#define QUADRATIC_SPLINE_PHASES_BITS 13 /* log2(QUADRATIC_SPLINE_PHASES) */ #define QUADRATIC_SPLINE_FRACSHIFT (MIXER_FRAC_BITS-QUADRATIC_SPLINE_PHASES_BITS) extern float *fQuadraticSplineLUT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/mixer/ft2_windowed_sinc.h new/ft2-clone-1.97/src/mixer/ft2_windowed_sinc.h --- old/ft2-clone-1.96/src/mixer/ft2_windowed_sinc.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/mixer/ft2_windowed_sinc.h 2025-07-13 16:46:26.000000000 +0200 @@ -5,16 +5,16 @@ #include "ft2_mix.h" // MIXER_FRAC_BITS #define SINC1_WIDTH 8 -#define SINC1_WIDTH_BITS 3 // log2(SINC1_WIDTH) +#define SINC1_WIDTH_BITS 3 /* log2(SINC1_WIDTH) */ #define SINC1_PHASES 8192 -#define SINC1_PHASES_BITS 13 // log2(SINC1_PHASES) +#define SINC1_PHASES_BITS 13 /* log2(SINC1_PHASES) */ #define SINC1_FRACSHIFT (MIXER_FRAC_BITS-(SINC1_PHASES_BITS+SINC1_WIDTH_BITS)) #define SINC1_FRACMASK ((SINC1_WIDTH*SINC1_PHASES)-SINC1_WIDTH) #define SINC2_WIDTH 16 -#define SINC2_WIDTH_BITS 4 // log2(SINC2_WIDTH) +#define SINC2_WIDTH_BITS 4 /* log2(SINC2_WIDTH) */ #define SINC2_PHASES 8192 -#define SINC2_PHASES_BITS 13 // log2(SINC2_PHASES) +#define SINC2_PHASES_BITS 13 /* log2(SINC2_PHASES) */ #define SINC2_FRACSHIFT (MIXER_FRAC_BITS-(SINC2_PHASES_BITS+SINC2_WIDTH_BITS)) #define SINC2_FRACMASK ((SINC2_WIDTH*SINC2_PHASES)-SINC2_WIDTH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/scopes/ft2_scope_macros.h new/ft2-clone-1.97/src/scopes/ft2_scope_macros.h --- old/ft2-clone-1.96/src/scopes/ft2_scope_macros.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/scopes/ft2_scope_macros.h 2025-07-13 16:46:26.000000000 +0200 @@ -13,23 +13,25 @@ uint32_t width = x + w; \ int32_t sample; \ int32_t position = s->position; \ - uint64_t positionFrac = 0; + uint64_t positionFrac = s->positionFrac; #define SCOPE_INIT_BIDI \ const uint32_t color = video.palette[PAL_PATTEXT]; \ uint32_t width = x + w; \ int32_t sample; \ int32_t actualPos, position = s->position; \ - uint64_t positionFrac = 0; \ + uint64_t positionFrac = s->positionFrac; \ bool samplingBackwards = s->samplingBackwards; #define LINED_SCOPE_INIT \ SCOPE_INIT \ + float fSample; \ int32_t smpY1, smpY2; \ width--; #define LINED_SCOPE_INIT_BIDI \ SCOPE_INIT_BIDI \ + float fSample; \ int32_t smpY1, smpY2; \ width--; @@ -39,41 +41,41 @@ #define NEAREST_NEIGHGBOR8 \ { \ - sample = s8[0] << 8; \ + fSample = s8[0]; \ } \ #define LINEAR_INTERPOLATION8(frac) \ { \ - const int32_t f = (frac) >> (SCOPE_FRAC_BITS-15); \ - sample = (s8[0] << 8) + ((((s8[1] - s8[0]) << 8) * f) >> 15); \ + const float f = (frac) * (1.0f / SCOPE_FRAC_SCALE); \ + fSample = s8[0] + ((s8[1] - s8[0]) * f); \ } \ #define NEAREST_NEIGHGBOR16 \ { \ - sample = s16[0]; \ + fSample = s16[0]; \ } \ #define LINEAR_INTERPOLATION16(frac) \ { \ - const int32_t f = (frac) >> (SCOPE_FRAC_BITS-15); \ - sample = s16[0] + (((s16[1] - s16[0]) * f) >> 15); \ + const float f = (frac) * (1.0f / SCOPE_FRAC_SCALE); \ + fSample = s16[0] + ((s16[1] - s16[0]) * f); \ } \ #define CUBIC_SMP8(frac) \ - const int16_t *t = scopeIntrpLUT + (((frac) >> (SCOPE_FRAC_BITS-SCOPE_INTRP_PHASES_BITS)) << SCOPE_INTRP_WIDTH_BITS); \ + const float *t = fScopeIntrpLUT + (((frac) >> (SCOPE_FRAC_BITS-SCOPE_INTRP_PHASES_BITS)) << SCOPE_INTRP_WIDTH_BITS); \ \ - sample = ((s8[-1] * t[0]) + \ + fSample = (s8[-1] * t[0]) + \ ( s8[0] * t[1]) + \ ( s8[1] * t[2]) + \ - ( s8[2] * t[3])) >> (SCOPE_INTRP_SCALE_BITS-8); + ( s8[2] * t[3]); #define CUBIC_SMP16(frac) \ - const int16_t *t = scopeIntrpLUT + (((frac) >> (SCOPE_FRAC_BITS-SCOPE_INTRP_PHASES_BITS)) << SCOPE_INTRP_WIDTH_BITS); \ + const float *t = fScopeIntrpLUT + (((frac) >> (SCOPE_FRAC_BITS-SCOPE_INTRP_PHASES_BITS)) << SCOPE_INTRP_WIDTH_BITS); \ \ - sample = ((s16[-1] * t[0]) + \ + fSample = (s16[-1] * t[0]) + \ ( s16[0] * t[1]) + \ ( s16[1] * t[2]) + \ - ( s16[2] * t[3])) >> SCOPE_INTRP_SCALE_BITS; + ( s16[2] * t[3]); #define CUBIC_INTERPOLATION8(frac) \ { \ @@ -109,7 +111,7 @@ LINEAR_INTERPOLATION8(frac) \ else \ CUBIC_INTERPOLATION8(frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (int32_t)((fSample * s->fVolume8) - 0.5f); #define INTERPOLATE_SMP16(pos, frac) \ const int16_t *s16 = s->base16 + pos; \ @@ -119,7 +121,7 @@ LINEAR_INTERPOLATION16(frac) \ else \ CUBIC_INTERPOLATION16(frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (int32_t)((fSample * s->fVolume16) - 0.5f); #define INTERPOLATE_SMP8_LOOP(pos, frac) \ const int8_t *s8 = s->base8 + pos; \ @@ -129,7 +131,7 @@ LINEAR_INTERPOLATION8(frac) \ else \ CUBIC_INTERPOLATION8_LOOP(pos, frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (int32_t)((fSample * s->fVolume8) - 0.5f); #define INTERPOLATE_SMP16_LOOP(pos, frac) \ const int16_t *s16 = s->base16 + pos; \ @@ -139,17 +141,17 @@ LINEAR_INTERPOLATION16(frac) \ else \ CUBIC_INTERPOLATION16_LOOP(pos, frac) \ - sample = (sample * s->volume) >> (16+2); + sample = (int32_t)((fSample * s->fVolume16) - 0.5f); #define SCOPE_GET_SMP8 \ if (s->active) \ - sample = (s->base8[position] * s->volume) >> (8+2); \ + sample = (int32_t)((s->base8[position] * s->fVolume8) - 0.5f); \ else \ sample = 0; #define SCOPE_GET_SMP16 \ if (s->active) \ - sample = (s->base16[position] * s->volume) >> (16+2); \ + sample = (int32_t)((s->base16[position] * s->fVolume16) - 0.5f); \ else \ sample = 0; @@ -157,7 +159,7 @@ if (s->active) \ { \ GET_BIDI_POSITION \ - sample = (s->base8[actualPos] * s->volume) >> (8+2); \ + sample = (int32_t)((s->base8[actualPos] * s->fVolume8) - 0.5f); \ } \ else \ { \ @@ -168,7 +170,7 @@ if (s->active) \ { \ GET_BIDI_POSITION \ - sample = (s->base16[actualPos] * s->volume) >> (16+2); \ + sample = (int32_t)((s->base16[actualPos] * s->fVolume16) - 0.5f); \ } \ else \ { \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/scopes/ft2_scopedraw.c new/ft2-clone-1.97/src/scopes/ft2_scopedraw.c --- old/ft2-clone-1.96/src/scopes/ft2_scopedraw.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/scopes/ft2_scopedraw.c 2025-07-13 16:46:26.000000000 +0200 @@ -10,14 +10,14 @@ #include "ft2_scopedraw.h" #include "ft2_scope_macros.h" -static int16_t *scopeIntrpLUT; +static float *fScopeIntrpLUT; static void scopeLine(int32_t x1, int32_t y1, int32_t y2, const uint32_t color); bool calcScopeIntrpLUT(void) { - scopeIntrpLUT = (int16_t *)malloc(SCOPE_INTRP_WIDTH * SCOPE_INTRP_PHASES * sizeof (int16_t)); - if (scopeIntrpLUT == NULL) + fScopeIntrpLUT = (float *)malloc(SCOPE_INTRP_WIDTH * SCOPE_INTRP_PHASES * sizeof (float)); + if (fScopeIntrpLUT == NULL) return false; /* Several tests have been done to figure out what interpolation method is most suitable @@ -27,24 +27,22 @@ */ // 4-point cubic B-spline (no overshoot) - - int16_t *ptr16 = scopeIntrpLUT; + float *fPtr = fScopeIntrpLUT; for (int32_t i = 0; i < SCOPE_INTRP_PHASES; i++) { const double x1 = i * (1.0 / SCOPE_INTRP_PHASES); const double x2 = x1 * x1; // x^2 const double x3 = x2 * x1; // x^3 - double t1 = (-(1.0/6.0) * x3) + ( (1.0/2.0) * x2) + (-(1.0/2.0) * x1) + (1.0/6.0); - double t2 = ( (1.0/2.0) * x3) + ( -1.0 * x2) + (2.0/3.0); - double t3 = (-(1.0/2.0) * x3) + ( (1.0/2.0) * x2) + ( (1.0/2.0) * x1) + (1.0/6.0); - double t4 = (1.0/6.0) * x3; - - // truncate, do not round! - *ptr16++ = (int16_t)(t1 * SCOPE_INTRP_SCALE); - *ptr16++ = (int16_t)(t2 * SCOPE_INTRP_SCALE); - *ptr16++ = (int16_t)(t3 * SCOPE_INTRP_SCALE); - *ptr16++ = (int16_t)(t4 * SCOPE_INTRP_SCALE); + const double t1 = (x1 * -(1.0/2.0)) + (x2 * (1.0/2.0)) + (x3 * -(1.0/6.0)) + (1.0/6.0); + const double t2 = (x2 * -1.0 ) + (x3 * (1.0/2.0)) + (2.0/3.0); + const double t3 = (x1 * (1.0/2.0)) + (x2 * (1.0/2.0)) + (x3 * -(1.0/2.0)) + (1.0/6.0); + const double t4 = x3 * (1.0/6.0); + + *fPtr++ = (float)t1; + *fPtr++ = (float)t2; + *fPtr++ = (float)t3; + *fPtr++ = (float)t4; } return true; @@ -52,10 +50,10 @@ void freeScopeIntrpLUT(void) { - if (scopeIntrpLUT != NULL) + if (fScopeIntrpLUT != NULL) { - free(scopeIntrpLUT); - scopeIntrpLUT = NULL; + free(fScopeIntrpLUT); + fScopeIntrpLUT = NULL; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/scopes/ft2_scopes.c new/ft2-clone-1.97/src/scopes/ft2_scopes.c --- old/ft2-clone-1.96/src/scopes/ft2_scopes.c 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/scopes/ft2_scopes.c 2025-07-13 16:46:26.000000000 +0200 @@ -428,14 +428,11 @@ } volatile scope_t s = scope[i]; // cache scope to lower thread race condition issues - if (s.active && s.volume > 0 && !audio.locked) + if (s.active && s.fVolume16 > 0.0f && !audio.locked) { // scope is active scope[i].wasCleared = false; - // get relative voice Hz (in relation to C4/2 rate) - s.drawDelta = (uint64_t)(scope[i].delta * ((double)SCOPE_HZ / ((double)C4_FREQ / 2.0))); - // clear scope background clearRect(scopeXOffs, scopeYOffs, scopeDrawLen, SCOPE_HEIGHT); @@ -489,10 +486,18 @@ const uint8_t status = scopeUpdateStatus[i]; if (status & IS_Vol) - sc->volume = ch->scopeVolume; + { + sc->fVolume8 = ch->scopeVolume * (((SCOPE_HEIGHT/2.0f) / 255.0f) / 128.0f); + sc->fVolume16 = ch->scopeVolume * (((SCOPE_HEIGHT/2.0f) / 255.0f) / 32768.0f); + } if (status & IS_Period) - sc->delta = (uint64_t)(dPeriod2Hz(ch->period) * (SCOPE_FRAC_SCALE / (double)SCOPE_HZ)); + { + const double dHz = dPeriod2Hz(ch->period); + + sc->delta = (uint64_t)(dHz * (SCOPE_FRAC_SCALE / (double)SCOPE_HZ)); + sc->drawDelta = (uint64_t)(dHz * (SCOPE_FRAC_SCALE / ((double)C4_FREQ/2.0))); + } if (status & IS_Trigger) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/src/scopes/ft2_scopes.h new/ft2-clone-1.97/src/scopes/ft2_scopes.h --- old/ft2-clone-1.96/src/scopes/ft2_scopes.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/src/scopes/ft2_scopes.h 2025-07-13 16:46:26.000000000 +0200 @@ -19,10 +19,8 @@ #define SCOPE_INTRP_WIDTH 4 #define SCOPE_INTRP_WIDTH_BITS 2 /* log2(SCOPE_INTRP_WIDTH) */ -#define SCOPE_INTRP_SCALE 32768 -#define SCOPE_INTRP_SCALE_BITS 15 /* log2(SCOPE_INTRP_SCALE) */ -#define SCOPE_INTRP_PHASES 256 /* enough for the scopes */ -#define SCOPE_INTRP_PHASES_BITS 8 /* log2(SCOPE_INTRP_PHASES) */ +#define SCOPE_INTRP_PHASES 512 /* enough for the scopes */ +#define SCOPE_INTRP_PHASES_BITS 9 /* log2(SCOPE_INTRP_PHASES) */ int32_t getSamplePositionFromScopes(uint8_t ch); void stopAllScopes(void); @@ -40,9 +38,9 @@ const int16_t *base16; bool wasCleared, sample16Bit, samplingBackwards, hasLooped; uint8_t loopType; - int16_t volume; int32_t loopStart, loopLength, loopEnd, sampleEnd, position; uint64_t delta, drawDelta, positionFrac; + float fVolume8, fVolume16; // if (loopEnabled && hasLooped && samplingPos <= loopStart+MAX_LEFT_TAPS) readFixedTapsFromThisPointer(); const int8_t *leftEdgeTaps8; Binary files old/ft2-clone-1.96/vs2019_project/ft2-clone/SDL2.dll and new/ft2-clone-1.97/vs2019_project/ft2-clone/SDL2.dll differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h new/ft2-clone-1.97/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h --- old/ft2-clone-1.96/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h 2025-07-13 16:46:26.000000000 +0200 @@ -750,8 +750,12 @@ size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); #endif +#ifndef _WIN32 /* strdup is not ANSI but POSIX, and its prototype might be hidden... */ +/* not for windows: might conflict with string.h where strdup may have + * dllimport attribute: https://github.com/libsdl-org/SDL/issues/12948 */ char *strdup(const char *str); +#endif /* Starting LLVM 16, the analyser errors out if these functions do not have their prototype defined (clang-diagnostic-implicit-function-declaration) */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-1.96/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h new/ft2-clone-1.97/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h --- old/ft2-clone-1.96/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h 2025-05-21 13:51:07.000000000 +0200 +++ new/ft2-clone-1.97/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h 2025-07-13 16:46:26.000000000 +0200 @@ -58,7 +58,7 @@ */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 32 -#define SDL_PATCHLEVEL 6 +#define SDL_PATCHLEVEL 8 /** * Macro to determine SDL version program was compiled against. Binary files old/ft2-clone-1.96/vs2019_project/ft2-clone/sdl/lib/SDL2main.lib and new/ft2-clone-1.97/vs2019_project/ft2-clone/sdl/lib/SDL2main.lib differ Binary files old/ft2-clone-1.96/vs2019_project/ft2-clone/sdl/lib64/SDL2main.lib and new/ft2-clone-1.97/vs2019_project/ft2-clone/sdl/lib64/SDL2main.lib differ Binary files old/ft2-clone-1.96/vs2019_project/x64/Debug/SDL2.dll and new/ft2-clone-1.97/vs2019_project/x64/Debug/SDL2.dll differ