Hello All,

I think there is a typo / bug in gri_wavfile.cc that prevents it from
working properly with big-endian machines.

Please see patch below.


Index: gnuradio-core/src/lib/io/gri_wavfile.cc
===================================================================
--- gnuradio-core/src/lib/io/gri_wavfile.cc (revision 8162)
+++ gnuradio-core/src/lib/io/gri_wavfile.cc (working copy)
@@ -71,7 +71,7 @@
 static inline int16_t
 host_to_wav(int16_t x)
 {
-  return bswap_32(x);
+  return bswap_16(x);
 }

 static inline uint32_t
@@ -89,7 +89,7 @@
 static inline int16_t
 wav_to_host(int16_t x)
 {
-  return bswap_32(x);
+  return bswap_16(x);
 }

 #else




Tim
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to