patch-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch-gnuradio] bug / typo in gri_wavfile.cc (gr_wavfile_source)


From: Tim Meehan
Subject: [Patch-gnuradio] bug / typo in gri_wavfile.cc (gr_wavfile_source)
Date: Wed, 9 Apr 2008 10:38:12 -0400


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]