Sorry...I did not see this originally. It looks like it might have to do with byteswap.h. I'll look into it.
Thank you!
Justin. Can you please let me know when you think you have fixed this?
Well, I don't have a mac to test on, so I'm kinda at a loss. I did change some of the configuration options, but I doubt they will help. I'm wondering if maybe bswap_32 is being redefined somewhere... Try the patch below. If it doesn't fix the problem, at least it might point me in the right direction.
-Justin
Index: flake/wav.c
===================================================================
--- flake/wav.c (revision 46)
+++ flake/wav.c (working copy)
@@ -537,7 +537,7 @@
#ifdef WORDS_BIG_ENDIAN
uint16_t *buf16 = (uint16_t *)buffer;
for(i=0; i<nsmp; i++) {
- buf16[i] = bswap_16(buf16[i]);
+ buf16[i] = flake_bswap_16(buf16[i]);
}
#endif
if(wf->source_format != WAV_SAMPLE_FMT_S16) return -1;
@@ -568,7 +568,7 @@
#ifdef WORDS_BIG_ENDIAN
uint32_t *buf32 = (uint32_t *)buffer;
for(i=0; i<nsmp; i++) {
- buf32[i] = bswap_32(buf32[i]);
+ buf32[i] = flake_bswap_32(buf32[i]);
}
#endif
if(wf->source_format != WAV_SAMPLE_FMT_FLT) return -1;
@@ -591,7 +591,7 @@
#ifdef WORDS_BIG_ENDIAN
uint64_t *buf64 = (uint64_t *)buffer;
for(i=0; i<nsmp; i++) {
- buf64[i] = bswap_64(buf64[i]);
+ buf64[i] = flake_bswap_64(buf64[i]);
}
#endif
if(wf->source_format != WAV_SAMPLE_FMT_DBL) return -1;
Index: bswap.h
===================================================================
--- bswap.h (revision 54)
+++ bswap.h (working copy)
@@ -8,24 +8,24 @@
#include "config.h"
-static inline uint16_t bswap_16(uint16_t x){
+static inline uint16_t flake_bswap_16(uint16_t x){
return (x>>8) | (x<<8);
}
-static inline uint32_t bswap_32(uint32_t x){
+static inline uint32_t flake_bswap_32(uint32_t x){
x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
return (x>>16) | (x<<16);
}
-static inline uint64_t bswap_64(uint64_t x)
+static inline uint64_t flake_bswap_64(uint64_t x)
{
union {
uint64_t ll;
uint32_t l[2];
} w, r;
w.ll = x;
- r.l[0] = bswap_32(w.l[1]);
- r.l[1] = bswap_32(w.l[0]);
+ r.l[0] = flake_bswap_32(w.l[1]);
+ r.l[1] = flake_bswap_32(w.l[0]);
return r.ll;
}
@@ -36,13 +36,13 @@
#define be2me_16(x) (x)
#define be2me_32(x) (x)
#define be2me_64(x) (x)
-#define le2me_16(x) bswap_16(x)
-#define le2me_32(x) bswap_32(x)
-#define le2me_64(x) bswap_64(x)
+#define le2me_16(x) flake_bswap_16(x)
+#define le2me_32(x) flake_bswap_32(x)
+#define le2me_64(x) flake_bswap_64(x)
#else
-#define be2me_16(x) bswap_16(x)
-#define be2me_32(x) bswap_32(x)
-#define be2me_64(x) bswap_64(x)
+#define be2me_16(x) flake_bswap_16(x)
+#define be2me_32(x) flake_bswap_32(x)
+#define be2me_64(x) flake_bswap_64(x)
#define le2me_16(x) (x)
#define le2me_32(x) (x)
#define le2me_64(x) (x)