Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mpg123 for openSUSE:Factory checked in at 2026-04-28 11:53:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpg123 (Old) and /work/SRC/openSUSE:Factory/.mpg123.new.11940 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mpg123" Tue Apr 28 11:53:49 2026 rev:50 rq:1349213 version:1.33.5 Changes: -------- --- /work/SRC/openSUSE:Factory/mpg123/mpg123.changes 2025-12-22 22:48:16.122623493 +0100 +++ /work/SRC/openSUSE:Factory/.mpg123.new.11940/mpg123.changes 2026-04-28 11:54:24.816622446 +0200 @@ -1,0 +2,19 @@ +Sat Apr 25 10:19:15 UTC 2026 - Luigi Baldoni <[email protected]> + +- Update to version 1.33.5 + * mpg123: Fix generic control mode for largefile-sensitive + builds, where 32 bit off_t was used with mpg123 API calls + expecting 64 bit off_t. + * mpg123-id3dump, out123: Enable 64 bit offset usage on + largefile-sensitive + platforms (regression since 1.32.0). + * libmpg123: Announce support for shadow stack / IBT in x86-64 + assembly. + * libmpg123: Also announce PAC/BTI for non-accurate neon64 + (aarch64) synth. + * libout123: Add a safeguard to ensure variable-length records + from buffer communication are always zero-terminated. + * libsyn123: Use union work buffer to avoid casts that may + look like breaking strict aliasing. + +------------------------------------------------------------------- Old: ---- mpg123-1.33.4.tar.bz2 mpg123-1.33.4.tar.bz2.sig New: ---- mpg123-1.33.5.tar.bz2 mpg123-1.33.5.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpg123.spec ++++++ --- /var/tmp/diff_new_pack.c9DRuV/_old 2026-04-28 11:54:25.568653500 +0200 +++ /var/tmp/diff_new_pack.c9DRuV/_new 2026-04-28 11:54:25.568653500 +0200 @@ -1,8 +1,7 @@ # # spec file for package mpg123 # -# Copyright (c) 2025 SUSE LLC -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +18,7 @@ %define sover 0 Name: mpg123 -Version: 1.33.4 +Version: 1.33.5 Release: 0 Summary: Console MPEG audio player and decoder library License: LGPL-2.1-only ++++++ mpg123-1.33.4.tar.bz2 -> mpg123-1.33.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/Makefile.in new/mpg123-1.33.5/Makefile.in --- old/mpg123-1.33.4/Makefile.in 2025-12-19 23:24:06.000000000 +0100 +++ new/mpg123-1.33.5/Makefile.in 2026-04-25 11:07:42.000000000 +0200 @@ -566,16 +566,17 @@ src/libmpg123/tabinit.c src/libmpg123/libmpg123.c \ src/libmpg123/gapless.h src/libmpg123/mpg123lib_intern.h \ src/libmpg123/mangle.h src/libmpg123/aarch64_defs.h \ - src/libmpg123/getcpuflags.h src/libmpg123/index.h \ - src/libmpg123/index.c src/libmpg123/layer1.c \ - src/libmpg123/layer2.c src/libmpg123/layer3.c \ - src/libmpg123/equalizer.c src/libmpg123/dither.c \ - src/libmpg123/synth_8bit.c src/libmpg123/synth.c \ - src/libmpg123/synth_s32.c src/libmpg123/synth_real.c \ - src/libmpg123/lfs_wrap.c src/libmpg123/icy.c \ - src/libmpg123/icy2utf8.c src/libmpg123/feature.c \ - src/libmpg123/ntom.c src/libmpg123/stringbuf.c \ - src/libmpg123/getcpuflags.S src/libmpg123/getcpuflags_x86_64.S \ + src/libmpg123/x86_64_defs.h src/libmpg123/getcpuflags.h \ + src/libmpg123/index.h src/libmpg123/index.c \ + src/libmpg123/layer1.c src/libmpg123/layer2.c \ + src/libmpg123/layer3.c src/libmpg123/equalizer.c \ + src/libmpg123/dither.c src/libmpg123/synth_8bit.c \ + src/libmpg123/synth.c src/libmpg123/synth_s32.c \ + src/libmpg123/synth_real.c src/libmpg123/lfs_wrap.c \ + src/libmpg123/icy.c src/libmpg123/icy2utf8.c \ + src/libmpg123/feature.c src/libmpg123/ntom.c \ + src/libmpg123/stringbuf.c src/libmpg123/getcpuflags.S \ + src/libmpg123/getcpuflags_x86_64.S \ src/libmpg123/getcpuflags_arm.c src/libmpg123/check_neon.S \ src/libmpg123/synth_altivec.c src/libmpg123/dct64_altivec.c \ src/libmpg123/dct64_i386.c src/libmpg123/synth_i486.c \ @@ -1240,13 +1241,14 @@ src/common.h src/sysutil.c src/sysutil.h src/control_generic.c \ src/equalizer.c src/getlopt.c src/getlopt.h src/httpget.c \ src/httpget.h src/resolver.c src/resolver.h src/genre.h \ - src/genre.c src/mpg123.c src/mpg123app.h src/metaprint.c \ - src/metaprint.h src/local.h src/local.c src/playlist.c \ - src/playlist.h src/streamdump.h src/streamdump.c src/term.c \ - src/term.h src/terms.h src/win32_support.h src/term_posix.c \ - src/term_win32.c src/term_none.c src/net123.h \ - src/net123_exec.c src/net123_winhttp.c src/net123_wininet.c \ - src/win32_support.c src/win32_net.c + src/genre.c src/mpg123.c src/mpg123app.h src/mpg123config.h \ + src/metaprint.c src/metaprint.h src/local.h src/local.c \ + src/playlist.c src/playlist.h src/streamdump.h \ + src/streamdump.c src/term.c src/term.h src/terms.h \ + src/win32_support.h src/term_posix.c src/term_win32.c \ + src/term_none.c src/net123.h src/net123_exec.c \ + src/net123_winhttp.c src/net123_wininet.c src/win32_support.c \ + src/win32_net.c @TERM_POSIX_TRUE@am__objects_69 = src/term_posix.$(OBJEXT) @TERM_WIN32_TRUE@am__objects_70 = src/term_win32.$(OBJEXT) @TERM_NONE_TRUE@am__objects_71 = src/term_none.$(OBJEXT) @@ -2962,6 +2964,7 @@ @NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/mpg123lib_intern.h \ @NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/mangle.h \ @NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/aarch64_defs.h \ +@NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/x86_64_defs.h \ @NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/getcpuflags.h \ @NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/index.h \ @NEED_LIB_TRUE@@NEED_MAINLIB_TRUE@ src/libmpg123/index.c \ @@ -3103,13 +3106,14 @@ src/sysutil.c src/sysutil.h src/control_generic.c \ src/equalizer.c src/getlopt.c src/getlopt.h src/httpget.c \ src/httpget.h src/resolver.c src/resolver.h src/genre.h \ - src/genre.c src/mpg123.c src/mpg123app.h src/metaprint.c \ - src/metaprint.h src/local.h src/local.c src/playlist.c \ - src/playlist.h src/streamdump.h src/streamdump.c src/term.c \ - src/term.h src/terms.h src/win32_support.h $(am__append_112) \ - $(am__append_113) $(am__append_114) $(am__append_115) \ - $(am__append_116) $(am__append_117) $(am__append_119) \ - $(am__append_121) $(am__append_122) + src/genre.c src/mpg123.c src/mpg123app.h src/mpg123config.h \ + src/metaprint.c src/metaprint.h src/local.h src/local.c \ + src/playlist.c src/playlist.h src/streamdump.h \ + src/streamdump.c src/term.c src/term.h src/terms.h \ + src/win32_support.h $(am__append_112) $(am__append_113) \ + $(am__append_114) $(am__append_115) $(am__append_116) \ + $(am__append_117) $(am__append_119) $(am__append_121) \ + $(am__append_122) # Replace common.h by sysutil.h! src_out123_SOURCES = src/sysutil.c src/sysutil.h src/common.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/NEWS new/mpg123-1.33.5/NEWS --- old/mpg123-1.33.4/NEWS 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/NEWS 2026-04-25 10:59:35.000000000 +0200 @@ -1,3 +1,21 @@ +1.33.5 +------ +- mpg123: Fix generic control mode for largefile-sensitive builds, where 32 bit + off_t was used with mpg123 API calls expecting 64 bit off_t. + I am appalled that it took a user on 32 bit ARM and a specific https stream + to notice this (bug 385, regression since 1.32.0). + The security impact of this could be serious, with memory corruption including + segfault being observed. +- mpg123-id3dump, out123: Enable 64 bit offset usage on largefile-sensitive + platforms (regression since 1.32.0). +- libmpg123: +-- Announce support for shadow stack / IBT in x86-64 assembly. +-- Also announce PAC/BTI for non-accurate neon64 (aarch64) synth. +- libout123: Add a safeguard to ensure variable-length records from buffer + communication are always zero-terminated. +- libsyn123: Use union work buffer to avoid casts that may look like breaking + strict aliasing. + 1.33.4 ------ - mpg123: In terminal control, ignore 7-bit escape sequences to avoid spurious diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/configure new/mpg123-1.33.5/configure --- old/mpg123-1.33.4/configure 2025-12-19 23:24:05.000000000 +0100 +++ new/mpg123-1.33.5/configure 2026-04-25 11:07:41.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for mpg123 1.33.4. +# Generated by GNU Autoconf 2.71 for mpg123 1.33.5. # # Report bugs to <[email protected]>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='mpg123' PACKAGE_TARNAME='mpg123' -PACKAGE_VERSION='1.33.4' -PACKAGE_STRING='mpg123 1.33.4' +PACKAGE_VERSION='1.33.5' +PACKAGE_STRING='mpg123 1.33.5' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1727,7 +1727,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mpg123 1.33.4 to adapt to many kinds of systems. +\`configure' configures mpg123 1.33.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1798,7 +1798,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mpg123 1.33.4:";; + short | recursive ) echo "Configuration of mpg123 1.33.5:";; esac cat <<\_ACEOF @@ -2077,7 +2077,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mpg123 configure 1.33.4 +mpg123 configure 1.33.5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2622,7 +2622,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mpg123 $as_me 1.33.4, which was +It was created by mpg123 $as_me 1.33.5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3992,7 +3992,7 @@ # Define the identity of the package. PACKAGE='mpg123' - VERSION='1.33.4' + VERSION='1.33.5' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -22468,7 +22468,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mpg123 $as_me 1.33.4, which was +This file was extended by mpg123 $as_me 1.33.5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22536,7 +22536,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -mpg123 config.status 1.33.4 +mpg123 config.status 1.33.5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/mpg123.spec new/mpg123-1.33.5/mpg123.spec --- old/mpg123-1.33.4/mpg123.spec 2025-12-19 23:24:12.000000000 +0100 +++ new/mpg123-1.33.5/mpg123.spec 2026-04-25 11:08:28.000000000 +0200 @@ -3,7 +3,7 @@ # - devel packages for alsa, sdl, etc... to build the respective output modules. Summary: The fast console mpeg audio decoder/player. Name: mpg123 -Version: 1.33.4 +Version: 1.33.5 Release: 1 URL: http://www.mpg123.org/ License: GPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/Makemodule.am new/mpg123-1.33.5/src/Makemodule.am --- old/mpg123-1.33.4/src/Makemodule.am 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/Makemodule.am 2026-04-25 10:59:35.000000000 +0200 @@ -81,6 +81,7 @@ src/genre.c \ src/mpg123.c \ src/mpg123app.h \ + src/mpg123config.h \ src/metaprint.c \ src/metaprint.h \ src/local.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/control_generic.c new/mpg123-1.33.5/src/control_generic.c --- old/mpg123-1.33.4/src/control_generic.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/control_generic.c 2026-04-25 10:59:35.000000000 +0200 @@ -1,14 +1,13 @@ /* control_generic.c: control interface for frontends and real console warriors - copyright 1997-99,2004-23 by the mpg123 project + copyright 1997-99,2004-26 by the mpg123 project free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Andreas Neuhaus and Michael Hipp reworked by Thomas Orgis - it was the entry point for eventually becoming maintainer... */ -#include "config.h" /* _BSD_SOURCE needed for setlinebuf, erm, but that's deprecated so trying _DEFAULT_SOURCE */ #ifndef _DEFAULT_SOURCE @@ -21,7 +20,6 @@ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif -#include "compat/compat.h" #include "mpg123app.h" #include "out123.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/Makemodule.am new/mpg123-1.33.5/src/libmpg123/Makemodule.am --- old/mpg123-1.33.4/src/libmpg123/Makemodule.am 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/Makemodule.am 2026-04-25 10:59:35.000000000 +0200 @@ -68,6 +68,7 @@ src/libmpg123/mpg123lib_intern.h \ src/libmpg123/mangle.h \ src/libmpg123/aarch64_defs.h \ + src/libmpg123/x86_64_defs.h \ src/libmpg123/getcpuflags.h \ src/libmpg123/index.h \ src/libmpg123/index.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/dct36_avx.S new/mpg123-1.33.5/src/libmpg123/dct36_avx.S --- old/mpg123-1.33.4/src/libmpg123/dct36_avx.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/dct36_avx.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* dct36_avx: AVX optimized dct36 for x86-64 - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/dct36_x86_64.S new/mpg123-1.33.5/src/libmpg123/dct36_x86_64.S --- old/mpg123-1.33.4/src/libmpg123/dct36_x86_64.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/dct36_x86_64.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* dct36_x86_64: SSE optimized dct36 for x86-64 - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/dct64_avx.S new/mpg123-1.33.5/src/libmpg123/dct64_avx.S --- old/mpg123-1.33.4/src/libmpg123/dct64_avx.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/dct64_avx.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* dct36_sse: AVX optimized dct64 for x86-64 - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #define samples %rdx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/dct64_avx_float.S new/mpg123-1.33.5/src/libmpg123/dct64_avx_float.S --- old/mpg123-1.33.4/src/libmpg123/dct64_avx_float.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/dct64_avx_float.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* dct64_x86_64_float: SSE optimized dct64 for x86-64 (float output version) - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #define samples %rdx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/dct64_x86_64.S new/mpg123-1.33.5/src/libmpg123/dct64_x86_64.S --- old/mpg123-1.33.4/src/libmpg123/dct64_x86_64.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/dct64_x86_64.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* dct64_x86_64: SSE optimized dct64 for x86-64 - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/dct64_x86_64_float.S new/mpg123-1.33.5/src/libmpg123/dct64_x86_64_float.S --- old/mpg123-1.33.4/src/libmpg123/dct64_x86_64_float.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/dct64_x86_64_float.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* dct64_x86_64_float: SSE optimized dct64 for x86-64 (float output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/getcpuflags_x86_64.S new/mpg123-1.33.5/src/libmpg123/getcpuflags_x86_64.S --- old/mpg123-1.33.4/src/libmpg123/getcpuflags_x86_64.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/getcpuflags_x86_64.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* getcpuflags_x86_64: get cpuflags for x86-64 - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" .text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_neon64.S new/mpg123-1.33.5/src/libmpg123/synth_neon64.S --- old/mpg123-1.33.4/src/libmpg123/synth_neon64.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_neon64.S 2026-04-25 10:59:35.000000000 +0200 @@ -6,6 +6,7 @@ initially written by Taihei Monma */ +#include "aarch64_defs.h" #include "mangle.h" RODATA diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_avx: AVX optimized synth for x86-64 (stereo specific version) - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx_accurate.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx_accurate.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx_accurate.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx_accurate.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_avx_accurate: AVX optimized synth for x86-64 (stereo specific, MPEG-compliant 16bit output version) - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx_float.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx_float.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx_float.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx_float.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_avx_float: AVX optimized synth for x86-64 (stereo specific, float output version) - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx_s32.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx_s32.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_avx_s32.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_avx_s32.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_avx_s32: AVX optimized synth for x86-64 (stereo specific, s32 output version) - copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_x86_64: SSE optimized synth for x86-64 (stereo specific version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64_accurate.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64_accurate.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64_accurate.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64_accurate.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_x86_64_accurate: SSE optimized synth for x86-64 (stereo specific, MPEG-compliant 16bit output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64_float.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64_float.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64_float.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64_float.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_x86_64_float: SSE optimized synth for x86-64 (stereo specific, float output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64_s32.S new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64_s32.S --- old/mpg123-1.33.4/src/libmpg123/synth_stereo_x86_64_s32.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_stereo_x86_64_s32.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_stereo_x86_64_s32: SSE optimized synth for x86-64 (stereo specific, s32 output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_x86_64.S new/mpg123-1.33.5/src/libmpg123/synth_x86_64.S --- old/mpg123-1.33.4/src/libmpg123/synth_x86_64.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_x86_64.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_x86_64: SSE optimized synth for x86-64 - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_x86_64_accurate.S new/mpg123-1.33.5/src/libmpg123/synth_x86_64_accurate.S --- old/mpg123-1.33.4/src/libmpg123/synth_x86_64_accurate.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_x86_64_accurate.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_x86_64_accurate: SSE optimized synth for x86-64 (MPEG-compliant 16bit output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_x86_64_float.S new/mpg123-1.33.5/src/libmpg123/synth_x86_64_float.S --- old/mpg123-1.33.4/src/libmpg123/synth_x86_64_float.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_x86_64_float.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_x86_64_float: SSE optimized synth for x86-64 (float output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/synth_x86_64_s32.S new/mpg123-1.33.5/src/libmpg123/synth_x86_64_s32.S --- old/mpg123-1.33.4/src/libmpg123/synth_x86_64_s32.S 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/synth_x86_64_s32.S 2026-04-25 10:59:35.000000000 +0200 @@ -1,11 +1,12 @@ /* synth_x86_64_s32: SSE optimized synth for x86-64 (s32 output version) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Taihei Monma */ +#include "x86_64_defs.h" #include "mangle.h" #ifdef IS_MSABI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libmpg123/x86_64_defs.h new/mpg123-1.33.5/src/libmpg123/x86_64_defs.h --- old/mpg123-1.33.4/src/libmpg123/x86_64_defs.h 1970-01-01 01:00:00.000000000 +0100 +++ new/mpg123-1.33.5/src/libmpg123/x86_64_defs.h 2026-04-25 10:59:35.000000000 +0200 @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: LGPL-2.1 + * + * 86_64_defs.h: Support macros for the x86-64 architectural feature + * + * include at the top of asm files to define GPU property section + */ + +#ifndef SRC_LIBMPG123_X86_64_DEFS_H_ +#define SRC_LIBMPG123_X86_64_DEFS_H_ + +/* Could adapt for x86 trivially, but do we bother? */ +#ifdef __x86_64__ + +#if defined(__CET__) && ((__CET__ & 1) != 0) + #define GNU_PROPERTY_X86_64_IBT 1 /* bit 0 GNU Notes is for IBT support */ +#else + #define GNU_PROPERTY_X86_64_IBT 0 +#endif + +#if defined(__CET__) && ((__CET__ & 2) != 0) + #define GNU_PROPERTY_X86_64_SHSTK 2 /* bit 1 GNU Notes is for PAC support */ +#else + #define GNU_PROPERTY_X86_64_SHSTK 0 +#endif + +/* Add the BTI support to GNU Notes section */ +#if defined(__ASSEMBLER__) && defined(__ELF__) +#if GNU_PROPERTY_X86_64_IBT != 0 || GNU_PROPERTY_X86_64_SHSTK != 0 + .pushsection .note.gnu.property, "a"; /* Start a new allocatable section */ + .balign 8; /* align it on a byte boundry */ + .long 4; /* size of "GNU\0" */ + .long 0x10; /* size of descriptor */ + .long 0x5; /* NT_GNU_PROPERTY_TYPE_0 */ + .asciz "GNU"; + .long 0xc0000002; /* GNU_PROPERTY_X86_FEATURE_1_AND */ + .long 4; /* Four bytes of data */ + .long (GNU_PROPERTY_X86_64_IBT|GNU_PROPERTY_X86_64_SHSTK); /* IBT or SHSTK is enabled */ + .long 0; /* padding for 8 byte alignment */ + .popsection; /* end the section */ +#endif /* GNU Notes additions */ +#endif /* if __ASSEMBLER__ and __ELF__ */ + +#endif /* __x86_64__ */ + +#endif /* SRC_LIBMPG123_X86_64_DEFS_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libout123/buffer.c new/mpg123-1.33.5/src/libout123/buffer.c --- old/mpg123-1.33.4/src/libout123/buffer.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libout123/buffer.c 2026-04-25 10:59:35.000000000 +0200 @@ -636,6 +636,10 @@ *buf = NULL; return 2; } + // If caller is not interested in the length, a zero-terminated string + // is assumed. Ensure that zero byte for defense in depth. + if(len && !reclen) + ((byte*)(*buf))[len-1] = 0; return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libsyn123/geiger.c new/mpg123-1.33.5/src/libsyn123/geiger.c --- old/mpg123-1.33.4/src/libsyn123/geiger.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libsyn123/geiger.c 2026-04-25 10:59:35.000000000 +0200 @@ -24,7 +24,7 @@ static void white_generator(syn123_handle *sh, int samples) { for(int i=0; i<samples; ++i) - sh->workbuf[1][i] = 2*rand_xorshift32(&sh->seed); + sh->workbuf.f64[1][i] = 2*rand_xorshift32(&sh->seed); } int attribute_align_arg @@ -234,11 +234,11 @@ { struct geigerspace *gs = sh->handle; for(int i=0; i<samples; ++i) - sh->workbuf[1][i] = speaker( gs + sh->workbuf.f64[1][i] = speaker( gs , discharge_force(gs, (rand_xorshift32(&sh->seed)+0.5)>gs->thres) ); // Soft clipping as speaker property. It can only move so far. // Of course this could be produced by a nicely nonlinear force, too. - syn123_soft_clip( sh->workbuf[1], MPG123_ENC_FLOAT_64, samples + syn123_soft_clip( sh->workbuf.f64[1], MPG123_ENC_FLOAT_64, samples , 1., 0.1, NULL ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libsyn123/libsyn123.c new/mpg123-1.33.5/src/libsyn123/libsyn123.c --- old/mpg123-1.33.4/src/libsyn123/libsyn123.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libsyn123/libsyn123.c 2026-04-25 10:59:35.000000000 +0200 @@ -365,7 +365,7 @@ static void silence_generator(syn123_handle *sh, int samples) { for(int i=0; i<samples; ++i) - sh->workbuf[1][i] = 0; + sh->workbuf.f64[1][i] = 0; } // Clear the handle of generator data structures. @@ -395,11 +395,11 @@ { /* Initialise to zero amplitude. */ for(int i=0; i<samples; ++i) - sh->workbuf[1][i] = 1; + sh->workbuf.f64[1][i] = 1; /* Add individual waves. */ for(size_t c=0; c<sh->wave_count; ++c) - wave_add_buffer( sh->workbuf[1], samples, sh->fmt.rate, sh->waves+c - , sh->workbuf[0] ); + wave_add_buffer( sh->workbuf.f64[1], samples, sh->fmt.rate, sh->waves+c + , sh->workbuf.f64[0] ); } /* Build internal table, allocate external table, convert to that one, */ @@ -625,11 +625,11 @@ { struct syn123_sweep *sw = sh->handle; // Precompute phases into work buffer. - sweep_phase(sh, 0, sh->workbuf[0], samples); + sweep_phase(sh, 0, sh->workbuf.f64[0], samples); // Initialise output to zero amplitude and multiply by the wave. for(int i=0; i<samples; ++i) - sh->workbuf[1][i] = 1.; - evaluate_wave(sh->workbuf[1], samples, sw->wave.id, sh->workbuf[0]); + sh->workbuf.f64[1][i] = 1.; + evaluate_wave(sh->workbuf.f64[1], samples, sw->wave.id, sh->workbuf.f64[0]); // Advance. sw->i = (sw->i+samples) % (sw->d + sw->post); } @@ -702,9 +702,9 @@ // The last phase served by the sweep, and the one after that that // tryly concludes the sweep (f==f2, not infinitesimally smaller). mdebug("computing endphase, with 2 points from %zu - 1 on", duration); - sweep_phase(sh, duration-1, sh->workbuf[0], 2); - double before_endphase = sh->workbuf[0][0]; - sw->endphase = sh->workbuf[0][1]; + sweep_phase(sh, duration-1, sh->workbuf.f64[0], 2); + double before_endphase = sh->workbuf.f64[0][0]; + sw->endphase = sh->workbuf.f64[0][1]; sw->post = 0; // Reset that again, only increasing if really needed. // The phase that would smoothly continue the sweep, one sample // after the last one. @@ -895,22 +895,22 @@ // Compute data into workbuf[1], possibly using workbuf[0] // in the process. // TODO for the future: Compute only in single precision if - // it is enough. + // it is enough. Right now generators always write to workbuf.f64[1]. sh->generator(sh, block); // Convert to external format, mono. We are abusing workbuf[0] here, // because it is big enough. // The converter does not use workbuf if converting from float. Dither is // added on the fly. int err = syn123_conv( - sh->workbuf[0], sh->fmt.encoding, sizeof(sh->workbuf[0]) - , sh->workbuf[1], MPG123_ENC_FLOAT_64, sizeof(double)*block + sh->workbuf.c[0], sh->fmt.encoding, sizeof(sh->workbuf.c[0]) + , sh->workbuf.c[1], MPG123_ENC_FLOAT_64, sizeof(double)*block , NULL, NULL, NULL ); if(err) { debug1("conv error: %i", err); break; } - syn123_mono2many( cdest, sh->workbuf[0] + syn123_mono2many( cdest, sh->workbuf.c[0] , sh->fmt.channels, samplesize, block ); cdest += framesize*block; dest_samples -= block; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libsyn123/pinknoise.c new/mpg123-1.33.5/src/libsyn123/pinknoise.c --- old/mpg123-1.33.4/src/libsyn123/pinknoise.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libsyn123/pinknoise.c 2026-04-25 10:59:35.000000000 +0200 @@ -122,7 +122,7 @@ static void pink_generator(syn123_handle *sh, int samples) { for(int i=0; i<samples; ++i) - sh->workbuf[1][i] = GeneratePinkNoise(sh->handle); + sh->workbuf.f64[1][i] = GeneratePinkNoise(sh->handle); } int attribute_align_arg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libsyn123/sampleconv.c new/mpg123-1.33.5/src/libsyn123/sampleconv.c --- old/mpg123-1.33.4/src/libsyn123/sampleconv.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libsyn123/sampleconv.c 2026-04-25 10:59:35.000000000 +0200 @@ -189,23 +189,35 @@ if(!mixenc || !mixframe || !inframe) return 0; // Use the whole workbuf, both halves. - int mbufblock = 2*bufblock*sizeof(double)/mixframe; + int mbufblock = sizeof(sh->workbuf)/mixframe; mdebug("mbufblock=%i (enc %i)", mbufblock, mixenc); while(samples) { int block = (int)smin(samples, mbufblock); - int err = syn123_conv( - sh->workbuf, mixenc, sizeof(sh->workbuf) - , cbuf, encoding, inframe*block - , NULL, NULL, NULL ); + int err = mixenc == MPG123_ENC_FLOAT_64 + ? syn123_conv( + sh->workbuf.f64, mixenc, sizeof(sh->workbuf.f64) + , cbuf, encoding, inframe*block + , NULL, NULL, NULL ) + : syn123_conv( + sh->workbuf.f32, mixenc, sizeof(sh->workbuf.f32) + , cbuf, encoding, inframe*block + , NULL, NULL, NULL ); if(!err) { - clipped += syn123_soft_clip(sh->workbuf, mixenc, block, limit, width, NULL); + clipped += mixenc == MPG123_ENC_FLOAT_64 + ? syn123_soft_clip(sh->workbuf.f64, mixenc, block, limit, width, NULL) + : syn123_soft_clip(sh->workbuf.f32, mixenc, block, limit, width, NULL); // No additional clipping can happen here. - err = syn123_conv( - cbuf, encoding, inframe*block - , sh->workbuf, mixenc, mixframe*block - , NULL, NULL, NULL ); + err = mixenc == MPG123_ENC_FLOAT_64 + ? syn123_conv( + cbuf, encoding, inframe*block + , sh->workbuf.f64, mixenc, mixframe*block + , NULL, NULL, NULL ) + : syn123_conv( + cbuf, encoding, inframe*block + , sh->workbuf.f32, mixenc, mixframe*block + , NULL, NULL, NULL ); } if(err) { @@ -542,7 +554,7 @@ if(!mixenc || !mixframe) return SYN123_BAD_CONV; // Use the whole workbuf, both halves. - int mbufblock = 2*bufblock*sizeof(double)/mixframe; + int mbufblock = sizeof(sh->workbuf)/mixframe; mdebug("mbufblock=%i (enc %i)", mbufblock, mixenc); // Abuse the handle workbuf for intermediate storage. size_t samples_left = samples; @@ -555,16 +567,26 @@ { int block = (int)smin(samples_left, mbufblock); size_t clipped_now = 0; - int err = syn123_conv( - sh->workbuf, mixenc, sizeof(sh->workbuf) - , csrc, src_enc, srcframe*block - , NULL, NULL, NULL ); + int err = mixenc == MPG123_ENC_FLOAT_64 + ? syn123_conv( + sh->workbuf.f64, mixenc, sizeof(sh->workbuf.f64) + , csrc, src_enc, srcframe*block + , NULL, NULL, NULL ) + : syn123_conv( + sh->workbuf.f32, mixenc, sizeof(sh->workbuf.f32) + , csrc, src_enc, srcframe*block + , NULL, NULL, NULL ); sh->do_dither = do_dither; // possibly dither now if(!err) - err = syn123_conv( - cdst, dst_enc, dstframe*block - , sh->workbuf, mixenc, mixframe*block - , NULL, &clipped_now, sh ); + err = mixenc == MPG123_ENC_FLOAT_64 + ? syn123_conv( + cdst, dst_enc, dstframe*block + , sh->workbuf.f64, mixenc, mixframe*block + , NULL, &clipped_now, sh ) + : syn123_conv( + cdst, dst_enc, dstframe*block + , sh->workbuf.f32, mixenc, mixframe*block + , NULL, &clipped_now, sh ); if(err) { mdebug("conv error: %i", err); @@ -861,6 +883,38 @@ SYN123_MIX_FUNC(double) } +// Call with f64 or f32 for conversion mixer code piece. +#define CONVMIX(fXX) \ + err = syn123_conv( \ + sh->workbuf.fXX[0], mixenc, sizeof(sh->workbuf.fXX[0]) \ + , csrc, src_enc, srcframe*block \ + , NULL, NULL, NULL ); \ + if(err) \ + goto mix_end; \ + /* Initialize to zero or convert from old output signal. */ \ + if(silence) \ + for(int i=0; i<block*dst_channels; ++i) \ + sh->workbuf.fXX[1][i] = 0.; \ + else \ + err = syn123_conv( \ + sh->workbuf.fXX[1], mixenc, sizeof(sh->workbuf.fXX[1]) \ + , cdst, dst_enc, dstframe*block \ + , NULL, NULL, NULL ); \ + /* Now mix one work buffer into the other. */ \ + if(err) \ + goto mix_end; \ + err = syn123_mix( sh->workbuf.fXX[1], mixenc, dst_channels \ + , sh->workbuf.fXX[0], mixenc, src_channels, mixmatrix, block \ + , 0, NULL, NULL ); \ + if(err) \ + goto mix_end; \ + /* And convert to the final output format. */ \ + err = syn123_conv( \ + cdst, dst_enc, dstframe*block \ + , sh->workbuf.fXX[1], mixenc, mixoutframe*block \ + , NULL, &clips_block, NULL ); + + int attribute_align_arg syn123_mix( void * MPG123_RESTRICT dst, int dst_enc, int dst_channels , void * MPG123_RESTRICT src, int src_enc, int src_channels @@ -926,7 +980,7 @@ goto mix_end; } // Mix from buffblock[0] to buffblock[1]. - int mbufblock = bufblock*sizeof(double)/mixframe; + int mbufblock = sizeof(sh->workbuf)/2/mixframe; mdebug("mbufblock=%i (enc %i)", mbufblock, mixenc); // Need at least one sample per round to avoid endless loop. // Of course, we would prefer more, but it's your fault for @@ -940,38 +994,15 @@ while(samples) { int block = (int)smin(samples, mbufblock); - err = syn123_conv( sh->workbuf[0], mixenc, sizeof(sh->workbuf[0]) - , csrc, src_enc, srcframe*block - , NULL, NULL, NULL ); - if(err) - goto mix_end; - // Initialize to zero or convert from old output signal. - if(silence) + size_t clips_block = 0; + // The same logic for f64 and f32, just written explictly for buffer type clarity. + if(mixenc == MPG123_ENC_FLOAT_64) + { + CONVMIX(f64) + } else { - if(mixenc == MPG123_ENC_FLOAT_32) - for(int i=0; i<block*dst_channels; ++i) - ((float*)(sh->workbuf[1]))[i] = 0.; - else - for(int i=0; i<block*dst_channels; ++i) - sh->workbuf[1][i] = 0.; + CONVMIX(f32) } - else - err = syn123_conv( sh->workbuf[1], mixenc, sizeof(sh->workbuf[1]) - , cdst, dst_enc, dstframe*block - , NULL, NULL, NULL ); - // Now mix one work buffer into the other. - if(!err) - err = syn123_mix( sh->workbuf[1], mixenc, dst_channels - , sh->workbuf[0], mixenc, src_channels, mixmatrix, block - , 0, NULL, NULL ); - if(err) - goto mix_end; - // And convert to the final output format. - size_t clips_block = 0; - err = syn123_conv( - cdst, dst_enc, dstframe*block - , sh->workbuf[1], mixenc, mixoutframe*block - , NULL, &clips_block, NULL ); clips += clips_block; if(err) goto mix_end; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libsyn123/syn123_int.h new/mpg123-1.33.5/src/libsyn123/syn123_int.h --- old/mpg123-1.33.4/src/libsyn123/syn123_int.h 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libsyn123/syn123_int.h 2026-04-25 10:59:35.000000000 +0200 @@ -79,10 +79,25 @@ // This is a set of two to accomodate x and y=function(x, y). // Working in blocks reduces function call overhead and gives // chance of vectorization. - // This may also be used as buffer for data with output encoding, - // exploiting the fact that double is the biggest data type we - // handle, also with the biggest alignment. - double workbuf[2][bufblock]; + // This may also be used as buffer for data with various encodings, + // hence a union to express this in the nicest possible way. This storage + // is used in a number of ways. + // All members have to be the same size, utilizing the whole storage + // block. Code using it assumes that sizeof(workbuf) gives the numbers + // of bytes accessible via any member. + union { + double f64[2][bufblock]; + float f32[2][2*bufblock]; + uint32_t u32[2][2*bufblock]; + int32_t i32[2][2*bufblock]; + uint16_t u16[2][4*bufblock]; + int16_t i16[2][4*bufblock]; + uint8_t u8[2][8*bufblock]; + int8_t i8[2][8*bufblock]; + // Yes, again the same, to be overly explicit about type names. + char c[2][8*bufblock]; + unsigned char uc[2][8*bufblock]; + } workbuf; struct mpg123_fmt fmt; int dither; // if dithering is activated for the handle int do_dither; // flag for recursive calls of syn123_conv() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/libsyn123/volume.c new/mpg123-1.33.5/src/libsyn123/volume.c --- old/mpg123-1.33.4/src/libsyn123/volume.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/libsyn123/volume.c 2026-04-25 10:59:35.000000000 +0200 @@ -47,6 +47,25 @@ } +#define CONVAMP(fXX) \ + err = syn123_conv( \ + sh->workbuf.fXX, mixenc, sizeof(sh->workbuf.fXX) \ + , cbuf, encoding, inframe*block \ + , NULL, NULL, NULL ); \ + if(!err) \ + { \ + err = syn123_amp( sh->workbuf.fXX, mixenc, block \ + , volume, offset, NULL, NULL ); \ + if(err) \ + return err; \ + err = syn123_conv( \ + cbuf, encoding, inframe*block \ + , sh->workbuf.fXX, mixenc, mixframe*block \ + , NULL, &clips_block, NULL ); \ + clips += clips_block; \ + } + + int attribute_align_arg syn123_amp( void* buf, int encoding, size_t samples , double volume, double offset, size_t *clipped, syn123_handle *sh ) @@ -94,22 +113,14 @@ while(samples) { int block = (int)smin(samples, mbufblock); - int err = syn123_conv( - sh->workbuf, mixenc, sizeof(sh->workbuf) - , cbuf, encoding, inframe*block - , NULL, NULL, NULL ); - if(!err) + size_t clips_block = 0; + int err = 0; + if(mixenc == MPG123_ENC_FLOAT_64) + { + CONVAMP(f64) + } else { - err = syn123_amp( sh->workbuf, mixenc, block - , volume, offset, NULL, NULL ); - if(err) - return err; - size_t clips_block = 0; - err = syn123_conv( - cbuf, encoding, inframe*block - , sh->workbuf, mixenc, mixframe*block - , NULL, &clips_block, NULL ); - clips += clips_block; + CONVAMP(f32) } if(err) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/mpg123-id3dump.c new/mpg123-1.33.5/src/mpg123-id3dump.c --- old/mpg123-1.33.4/src/mpg123-id3dump.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/mpg123-id3dump.c 2026-04-25 10:59:35.000000000 +0200 @@ -9,17 +9,16 @@ /* Need snprintf(). */ #define _DEFAULT_SOURCE #define _BSD_SOURCE -#include "config.h" +#include "mpg123config.h" #include "version.h" #include "compat/compat.h" -#if defined(WIN32) && defined(DYNAMIC_BUILD) -#define LINK_MPG123_DLL -#endif #include "mpg123.h" #include "getlopt.h" #include <errno.h> #include <ctype.h> +#ifdef _WIN32 #include "win32_support.h" +#endif #include "common/debug.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/mpg123app.h new/mpg123-1.33.5/src/mpg123app.h --- old/mpg123-1.33.4/src/mpg123app.h 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/mpg123app.h 2026-04-25 10:59:35.000000000 +0200 @@ -1,7 +1,7 @@ /* mpg123: main code of the program (not of the decoder...) - copyright 1995-2020 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp @@ -11,30 +11,20 @@ #ifndef MPG123_H #define MPG123_H -#include "config.h" -#ifndef _FILE_OFFSET_BITS -#ifdef LFS_SENSITIVE -#ifdef LFS_LARGEFILE_64 -#define _FILE_OFFSET_BITS 64 -#endif -#endif -#endif +#include "mpg123config.h" /* everyone needs it */ #include "compat/compat.h" /* import DLL symbols on windows */ #include "httpget.h" -#if _WIN32 +#ifdef _WIN32 #include "win32_support.h" #endif #include "streamdump.h" -#if defined(WIN32) && defined(DYNAMIC_BUILD) -#define LINK_MPG123_DLL -#endif #include "mpg123.h" #define MPG123_REMOTE #define REMOTE_BUFFER_SIZE 2048 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/mpg123config.h new/mpg123-1.33.5/src/mpg123config.h --- old/mpg123-1.33.4/src/mpg123config.h 1970-01-01 01:00:00.000000000 +0100 +++ new/mpg123-1.33.5/src/mpg123config.h 2026-04-25 10:59:35.000000000 +0200 @@ -0,0 +1,36 @@ +/* + mpg123config: basic config for mpg123 apps + + copyright 2025-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis + + This includes config.h and enables 64 bit offsets where the system supports and + reacts to the switch, as determined by our custom largefile detection. + Include first, esp. before mpg123.h. Just use it instead of plain config.h. + + It also prepares use of mpg123 library headers as client code, where needed. +*/ + +#ifndef MPG123CONFIG_H +#define MPG123CONFIG_H + +#include "config.h" + +// This early settlement of _FILE_OFFSET_BITS is important to prevent +// subtle bugs where you could end up with 32 bit off_t but mappings +// to functions that expect 64 bit off_t. +#ifndef _FILE_OFFSET_BITS +#ifdef LFS_SENSITIVE +#ifdef LFS_LARGEFILE_64 +#define _FILE_OFFSET_BITS 64 +#endif +#endif +#endif + +// Ensure that headers are switched to DLL linking mode on Windows. +#if defined(_WIN32) && defined(DYNAMIC_BUILD) +#define LINK_MPG123_DLL +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/out123.c new/mpg123-1.33.5/src/out123.c --- old/mpg123-1.33.4/src/out123.c 2025-12-19 23:23:34.000000000 +0100 +++ new/mpg123-1.33.5/src/out123.c 2026-04-25 10:59:35.000000000 +0200 @@ -27,16 +27,13 @@ */ #define ME "out123" -#include "config.h" +#include "mpg123config.h" #include "version.h" #include "compat/compat.h" #include <ctype.h> -#if _WIN32 +#ifdef _WIN32 #include "win32_support.h" #endif -#if defined(_WIN32) && defined(DYNAMIC_BUILD) -#define LINK_MPG123_DLL -#endif #include "out123.h" #include "local.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.33.4/src/version.h new/mpg123-1.33.5/src/version.h --- old/mpg123-1.33.4/src/version.h 2025-12-19 23:23:41.000000000 +0100 +++ new/mpg123-1.33.5/src/version.h 2026-04-25 11:05:58.000000000 +0200 @@ -16,7 +16,7 @@ // only single spaces as separator to ease parsing by build scripts #define MPG123_MAJOR 1 #define MPG123_MINOR 33 -#define MPG123_PATCH 4 +#define MPG123_PATCH 5 // Don't get too wild with that to avoid confusing m4. No brackets. // Also, it should fit well into a sane file name for the tarball. #define MPG123_SUFFIX ""
