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-11-30 15:03:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ft2-clone (Old) and /work/SRC/openSUSE:Factory/.ft2-clone.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ft2-clone" Mon Nov 30 15:03:25 2026 rev:53 rq:1401658 version:2.30 Changes: -------- --- /work/SRC/openSUSE:Factory/ft2-clone/ft2-clone.changes 2026-11-05 18:21:46.099337502 +0100 +++ /work/SRC/openSUSE:Factory/.ft2-clone.new.1340718/ft2-clone.changes 2026-11-30 15:03:29.568166857 +0100 @@ -1,0 +2,13 @@ +Mon Nov 30 12:46:47 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 2.30 + * Fixed: When saving a 16-bit sample as .RAW, the length was + halved. + * Fixed: When saving a sample as .WAV, the "LIST" field in the + header would have a wrongly set length. + * Fixed: When loading a stereo .MP3 file as a sample and + selecting either the left or right channel data for import, + the sample data would start at index 1 instead of 0 + (beginning), and the very last sample point would be missing. + +------------------------------------------------------------------- Old: ---- ft2-clone-2.29.tar.gz New: ---- ft2-clone-2.30.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ft2-clone.spec ++++++ --- /var/tmp/diff_new_pack.5dQkP6/_old 2026-11-30 15:03:30.917223989 +0100 +++ /var/tmp/diff_new_pack.5dQkP6/_new 2026-11-30 15:03:30.919224073 +0100 @@ -17,7 +17,7 @@ Name: ft2-clone -Version: 2.29 +Version: 2.30 Release: 0 Summary: Fasttracker II clone License: BSD-3-Clause AND CC-BY-NC-SA-4.0 ++++++ ft2-clone-2.29.tar.gz -> ft2-clone-2.30.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/make-macos.sh new/ft2-clone-2.30/make-macos.sh --- old/ft2-clone-2.29/make-macos.sh 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/make-macos.sh 2026-11-30 11:32:45.000000000 +0100 @@ -36,8 +36,9 @@ # function compile() { rm $1 &> /dev/null - clang++ -c $VERBOSE $CFLAGS -F -g0 -DNDEBUG -D__MACOSX_CORE__ -x c++ -std=c++17 src/rtmidi/RtMidi.cpp src/rtmidi/rtmidi_c.cpp - clang $VERBOSE $CFLAGS -F /Library/Frameworks -g0 -DNDEBUG -DHAS_MIDI -D__MACOSX_CORE__ src/gfxdata/*.c src/mixer/*.c src/scopes/*.c src/modloaders/*.c src/smploaders/*.c src/*.c -ffast-math -Winit-self -Wno-deprecated -Wextra -Wunused -mno-ms-bitfields -Wno-missing-field-initializers $LDFLAGS -L /Library/Frameworks -framework SDL2 -framework CoreMidi -framework CoreAudio -framework Cocoa -liconv -lpthread -lm -lstdc++ *.o -o $1 + clang++ -c $VERBOSE $CFLAGS -F -g0 -DNDEBUG -D__MACOSX_CORE__ src/rtmidi/RtMidi.cpp src/rtmidi/rtmidi_c.cpp + clang $VERBOSE $CFLAGS -F /Library/Frameworks -g0 -DNDEBUG -DHAS_MIDI src/gfxdata/*.c src/mixer/*.c src/scopes/*.c src/modloaders/*.c src/smploaders/*.c src/*.c -ffast-math -Winit-self -Wno-deprecated -Wextra -Wunused -mno-ms-bitfields -Wno-missing-field-initializers $LDFLAGS -L /Library/Frameworks -framework SDL2 -framework CoreMidi -framework CoreAudio -framework Cocoa -liconv -lpthread -lm -lstdc++ *.o -o $1 + rm *.o &> /dev/null return $? } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_audio.h new/ft2-clone-2.30/src/ft2_audio.h --- old/ft2-clone-2.29/src/ft2_audio.h 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_audio.h 2026-11-30 11:32:45.000000000 +0100 @@ -20,11 +20,11 @@ // more bits makes little sense here -#define BPM_FRAC_BITS 52 +#define BPM_FRAC_BITS 56 #define BPM_FRAC_SCALE (1ULL << BPM_FRAC_BITS) #define BPM_FRAC_MASK (BPM_FRAC_SCALE-1) -#define TICK_TIME_FRAC_BITS 52 +#define TICK_TIME_FRAC_BITS 56 #define TICK_TIME_FRAC_SCALE (1ULL << TICK_TIME_FRAC_BITS) #define TICK_TIME_FRAC_MASK (TICK_TIME_FRAC_SCALE-1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_header.h new/ft2-clone-2.30/src/ft2_header.h --- old/ft2-clone-2.29/src/ft2_header.h 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_header.h 2026-11-30 11:32:45.000000000 +0100 @@ -14,7 +14,7 @@ #endif #include "ft2_replayer.h" -#define PROG_VER_STR "2.29" +#define PROG_VER_STR "2.30" // do NOT change these! It will only mess things up... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_hpc.c new/ft2-clone-2.30/src/ft2_hpc.c --- old/ft2-clone-2.29/src/ft2_hpc.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_hpc.c 2026-11-30 11:32:45.000000000 +0100 @@ -21,7 +21,7 @@ #include <stdbool.h> #include "ft2_hpc.h" -#define DURATION_FRAC_BITS 52 /* more makes little sense */ +#define DURATION_FRAC_BITS 56 /* more makes little sense */ #define DURATION_FRAC_SCALE (1ULL << DURATION_FRAC_BITS) #define DURATION_FRAC_MASK (DURATION_FRAC_SCALE-1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_pattern_ed.c new/ft2-clone-2.30/src/ft2_pattern_ed.c --- old/ft2-clone-2.29/src/ft2_pattern_ed.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_pattern_ed.c 2026-11-30 11:32:45.000000000 +0100 @@ -2167,7 +2167,8 @@ void resetPlaybackTime(void) { - song.dPlaybackSeconds = 0.0; + song.playbackSecondsFrac56fp = 0; + song.playbackSeconds = 0; last_TimeH = last_TimeM = last_TimeS = 0; } @@ -2175,7 +2176,7 @@ { if (songPlaying) { - uint32_t seconds = (int32_t)song.dPlaybackSeconds; + volatile uint32_t seconds = song.playbackSeconds; last_TimeH = seconds / 3600; seconds -= last_TimeH * 3600; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_replayer.c new/ft2-clone-2.30/src/ft2_replayer.c --- old/ft2-clone-2.29/src/ft2_replayer.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_replayer.c 2026-11-30 11:32:45.000000000 +0100 @@ -30,7 +30,8 @@ #include "mixer/ft2_windowed_sinc.h" static uint32_t logTab[4*12*16], frequencyMulFactor, frequencyDivFactor; -static double dSongTickDuration[(MAX_BPM-MIN_BPM)+1], dDeltaMul, dScopeDeltaMul, dScopeDrawDeltaMul; +static uint64_t songTickDuration56fp[(MAX_BPM-MIN_BPM)+1]; +static double dDeltaMul, dScopeDeltaMul, dScopeDrawDeltaMul; static bool bxxOverflow; static note_t nilPatternLine[MAX_CHANNELS]; @@ -490,7 +491,7 @@ audio.samplesPerTickIntTab[i] = (uint32_t)dSamplesPerTickInt; audio.samplesPerTickFracTab[i] = (uint64_t)(dSamplesPerTickFrac * BPM_FRAC_SCALE); - dSongTickDuration[i] = 1.0 / dFt2BPMHz; + songTickDuration56fp[i] = (uint64_t)round((1.0 / dFt2BPMHz) * (1ULL << 56)); audio.tickTimeIntTab[i] = (uint32_t)dTickTimeInt; audio.tickTimeFracTab[i] = (uint64_t)(dTickTimeFrac * TICK_TIME_FRAC_SCALE); @@ -2375,10 +2376,20 @@ // for song playback counter (hh:mm:ss) if (song.BPM >= MIN_BPM && song.BPM <= MAX_BPM) // just in case { - song.dPlaybackSeconds += dSongTickDuration[song.BPM-MIN_BPM]; + song.playbackSecondsFrac56fp += songTickDuration56fp[song.BPM-MIN_BPM]; - if (song.dPlaybackSeconds >= (99.0*60.0*60.0)+60.0) // wrap around 99:59:59 -> 00:00:00 - song.dPlaybackSeconds = 0.0; + if (song.playbackSecondsFrac56fp >= (1ULL << 56)) + { + song.playbackSecondsFrac56fp &= (1ULL << 56) - 1; + + volatile uint32_t seconds = song.playbackSeconds; + + seconds++; + if (seconds >= (99*60*60)+60) // wrap around 99:59:59 -> 00:00:00 + seconds = 0; + + song.playbackSeconds = seconds; + } } bool tickZero = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_replayer.h new/ft2-clone-2.30/src/ft2_replayer.h --- old/ft2-clone-2.29/src/ft2_replayer.h 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_replayer.h 2026-11-30 11:32:45.000000000 +0100 @@ -273,7 +273,9 @@ int16_t songPos, pattNum, row, currNumRows; uint16_t songLength, songLoopStart, BPM, speed, initialSpeed, globalVolume, tick; int32_t numChannels; - double dPlaybackSeconds; + + volatile uint32_t playbackSeconds; + volatile uint64_t playbackSecondsFrac56fp; } song_t; int32_t getSampleC4Hz(sample_t *s); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_sample_saver.c new/ft2-clone-2.30/src/ft2_sample_saver.c --- old/ft2-clone-2.29/src/ft2_sample_saver.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_sample_saver.c 2026-11-30 11:32:45.000000000 +0100 @@ -146,7 +146,7 @@ return false; } - if (fwrite(samplePtr, sampleLen, 1, f) != 1) + if (fwrite(samplePtr, sampleLen * (sample16Bit ? 2 : 1), 1, f) != 1) { fclose(f); okBoxThreadSafe(0, "System message", "Error saving sample: General I/O error!", NULL); @@ -455,7 +455,7 @@ tmpLen = 4 + (4 + 4) + (progNameLen + 1 + ((progNameLen + 1) & 1)); if (smpNameLen > 0) - tmpLen += ((4 + 4) + (progNameLen + 1 + ((progNameLen + 1) & 1))); + tmpLen += ((4 + 4) + (smpNameLen + 1 + ((smpNameLen + 1) & 1))); fwrite("LIST", sizeof (int32_t), 1, f); fwrite(&tmpLen, sizeof (int32_t), 1, f); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/ft2_tables.c new/ft2-clone-2.30/src/ft2_tables.c --- old/ft2-clone-2.29/src/ft2_tables.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/ft2_tables.c 2026-11-30 11:32:45.000000000 +0100 @@ -58,7 +58,7 @@ // Formula: // for (i = 0 to 1935) x = (1936 - i) * 4 // -const uint16_t linearPeriodLUT[1936] = // bit-exact to FT2 table +const uint16_t linearPeriodLUT[1936] = // bit-exact to FT2's resulting table in RAM { 7744, 7740, 7736, 7732, 7728, 7724, 7720, 7716, 7712, 7708, 7704, 7700, 7696, 7692, 7688, 7684, 7680, 7676, 7672, 7668, 7664, 7660, 7656, 7652, 7648, 7644, 7640, 7636, 7632, 7628, 7624, 7620, @@ -183,10 +183,17 @@ 64, 60, 56, 52, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4 }; -// The original formula is over-engineered and buggy. A simpler (and more accurate) formula would be: -// for (i = 0 to 1935) x = round[(1712*4*16) / 2^((368+i) / (12*16))] -// -const uint16_t amigaPeriodLUT[1936] = // bit-exact to FT2 table +/* The original formula for creating the following table is over-engineered, probably +** to better match some of the weird values in the original ProTracker period table. +** But why would that matter, when FT2 uses a different tuning base than ProTracker +** anyway..? The formula is also completely bugged for the last 17 values! +** +** The simpler, nominal formula (midC=8363.0Hz tuning) would be: +** for (i = 0 to 1935) x = round[(1712*4*16) / 2^((368+i) / (12*16))] +** +** We do not use the formula above, as we want exact FT2 behavior for Amiga period mode. +*/ +const uint16_t amigaPeriodLUT[1936] = // bit-exact to FT2's resulting table in RAM { 29024, 28912, 28800, 28704, 28608, 28496, 28384, 28288, 28192, 28096, 28000, 27888, 27776, 27680, 27584, 27488, 27392, 27296, 27200, 27104, 27008, 26912, 26816, 26720, 26624, 26528, 26432, 26336, 26240, 26144, 26048, 25952, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/mixer/ft2_windowed_sinc.c new/ft2-clone-2.30/src/mixer/ft2_windowed_sinc.c --- old/ft2-clone-2.29/src/mixer/ft2_windowed_sinc.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/mixer/ft2_windowed_sinc.c 2026-11-30 11:32:45.000000000 +0100 @@ -1,5 +1,9 @@ -// polyphase windowed-sinc LUT generator - +/* Polyphase windowed-sinc LUT generator. +** +** The kernels should be used with linear interpolation between the +** phases when in use, to achieve excellent phase precision at only +** 256 pre-computed phases (low on memory/cache use). +*/ #include <stdint.h> #include <stdbool.h> #include <stdlib.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.29/src/smploaders/ft2_load_mp3.c new/ft2-clone-2.30/src/smploaders/ft2_load_mp3.c --- old/ft2-clone-2.29/src/smploaders/ft2_load_mp3.c 2026-11-03 20:23:57.000000000 +0100 +++ new/ft2-clone-2.30/src/smploaders/ft2_load_mp3.c 2026-11-30 11:32:45.000000000 +0100 @@ -162,7 +162,7 @@ else src16 = (int16_t *)info.buffer + 1; - for (uint32_t i = 1; i < sampleLength; i++, src16 += 2) + for (uint32_t i = 0; i < sampleLength; i++, src16 += 2) dst16[i] = *src16; } }
