From 6a70a9edd704fa2bc8da60d2965d549f1a3d6f11 Mon Sep 17 00:00:00 2001 From: AliceLR Date: Wed, 28 Jan 2026 15:54:26 -0700 Subject: [PATCH] Use XMP_MAX_SRATE for -f limit instead of 48000. Preserve the old limit of 48000 if xmp_vercode indicates an older library version. --- Changelog | 1 + src/options.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index f5aaee7f..a3e9f631 100644 --- a/Changelog +++ b/Changelog @@ -7,6 +7,7 @@ Stable versions a default panning value (sub->pan < 0). - Don't unmute muted IT channels unless explicitly unmuted by the -S/--solo option. + - Use XMP_MAX_SRATE as the limit for -f instead of 48000. 4.2.0 (20230615): Changes by Özkan Sezer: diff --git a/src/options.c b/src/options.c index a872de35..27fb9045 100644 --- a/src/options.c +++ b/src/options.c @@ -382,8 +382,13 @@ void get_options(int argc, char **argv, struct options *options) /* Set limits */ if (options->rate < 1000) options->rate = 1000; /* Min. rate 1 kHz */ - if (options->rate > 48000) - options->rate = 48000; /* Max. rate 48 kHz */ + if (options->rate > XMP_MAX_SRATE) + options->rate = XMP_MAX_SRATE; /* Max. rate 768 kHz */ + + if (xmp_vercode < 0x040700) { + if (options->rate > 48000) + options->rate = 48000; /* Old max. rate 48kHz */ + } /* apply guess if no driver selected */ if (!options->driver_id)