projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2018ff3
)
[sink_flac] add missing SWAPS definition (closes gh-407, thanks to @tperale)
author
Thomas Perale
<thomas.perale@mind.be>
Thu, 19 Sep 2024 16:57:16 +0000
(18:57 +0200)
committer
Paul Brossier
<piem@piem.org>
Sun, 16 Nov 2025 12:39:40 +0000
(13:39 +0100)
src/io/sink_flac.c
patch
|
blob
|
history
diff --git
a/src/io/sink_flac.c
b/src/io/sink_flac.c
index
0414479
..
0a1cbc2
100644
(file)
--- 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)