Skip to content

Commit f960c28

Browse files
authored
Use XMP_MAX_SRATE for -f limit instead of 48000. (#74)
Preserve the old limit of 48000 if xmp_vercode indicates an older library version.
1 parent 34154d1 commit f960c28

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Stable versions
77
a default panning value (sub->pan < 0).
88
- Don't unmute muted IT channels unless explicitly unmuted by
99
the -S/--solo option.
10+
- Use XMP_MAX_SRATE as the limit for -f instead of 48000.
1011

1112
4.2.0 (20230615):
1213
Changes by Özkan Sezer:

src/options.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,13 @@ void get_options(int argc, char **argv, struct options *options)
382382
/* Set limits */
383383
if (options->rate < 1000)
384384
options->rate = 1000; /* Min. rate 1 kHz */
385-
if (options->rate > 48000)
386-
options->rate = 48000; /* Max. rate 48 kHz */
385+
if (options->rate > XMP_MAX_SRATE)
386+
options->rate = XMP_MAX_SRATE; /* Max. rate 768 kHz */
387+
388+
if (xmp_vercode < 0x040700) {
389+
if (options->rate > 48000)
390+
options->rate = 48000; /* Old max. rate 48kHz */
391+
}
387392

388393
/* apply guess if no driver selected */
389394
if (!options->driver_id)

0 commit comments

Comments
 (0)