Use XMP_MAX_SRATE for -f limit instead of 48000.#74
Conversation
|
Maybe the following addition?? (for builds made against libxmp >= 4.7, EDIT: Removing the ifdefs which shouldn't be necessary. diff --git a/src/options.c b/src/options.c
index 73c4967..b8939a7 100644
--- a/src/options.c
+++ b/src/options.c
@@ -385,4 +385,6 @@ void get_options(int argc, char **argv, struct options *options)
if (options->rate > XMP_MAX_SRATE)
options->rate = XMP_MAX_SRATE; /* Max. rate 768 kHz */
+ if (xmp_vercode < 0x040700 && options->rate > 48000)
+ options->rate = 48000; /* 48 kHz for libxmp < 4.7.0 */
/* apply guess if no driver selected */ |
I'm not opposed to this, but libxmp/libxmp#964 may require bumping the minimum libxmp version up to 4.7.0 anyway (xmp 4.3.0?). If we go ahead and keep support for 4.4.x, that would be easy to work around by putting something like this in xmp-cli common.h + disabling 24-bit and 32-bit output for libraries older than 4.7.0: #ifndef XMP_FORMAT_32BIT
#define XMP_FORMAT_32BIT (1 << 3)
#endif |
That would be ideal IMO: Let's do that in another PR where 32 bit support is added to xmp-cli. |
Preserve the old limit of 48000 if xmp_vercode indicates an older library version.
25c697f to
6a70a9e
Compare
Done, more or less the same way you did (I separated the two conditions to maybe make it easier to merge with #75...). |
|
P.S.: Should we make 8bit and 32bit mutually exclusive, or keep ignoring 8bit if 32bit is set like we do at present? |
I'm not sure what would be better. They should probably be an enum like the (I don't think this really matters for xmp-cli since #75 makes |
No description provided.