From: Thomas Perale Date: Thu, 19 Sep 2024 16:57:16 +0000 (+0200) Subject: [sink_flac] add missing SWAPS definition (closes gh-407, thanks to @tperale) X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b34ed460afbd0725e35a3858dc79e903ef4f7aa5;p=aubio.git [sink_flac] add missing SWAPS definition (closes gh-407, thanks to @tperale) --- diff --git a/src/io/sink_flac.c b/src/io/sink_flac.c index 04144793..0a1cbc26 100644 --- a/src/io/sink_flac.c +++ b/src/io/sink_flac.c @@ -36,6 +36,9 @@ #define MAX_WRITE_SIZE 4096 +// swap endian of a short +#define SWAPS(x) ((x & 0xff) << 8) | ((x & 0xff00) >> 8) + // swap host to little endian #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) #define HTOLES(x) SWAPS(x)