shithub: sox

Download patch

ref: 5ecbc1338fb56c5c6e50b8a7e2521ab8b5f6bc1b
parent: f9e3268baa83cbab1acf1575d530ad692e3f1638
author: rrt <rrt>
date: Thu May 10 09:43:25 EDT 2007

Fix to output host-endian rather than little-endian data (patch
#1704042 from Solra Bizna).

--- a/src/alsa.c
+++ b/src/alsa.c
@@ -148,7 +148,7 @@
                     sox_fail_errno(ft,SOX_EFMT,"ALSA driver does not support signed word samples");
                     return SOX_EOF;
                 }
-                *fmt = SND_PCM_FORMAT_S16_LE;
+                *fmt = SND_PCM_FORMAT_S16;
                 break;
             case SOX_ENCODING_UNSIGNED:
                 if (!(snd_pcm_format_mask_test(fmask, SND_PCM_FORMAT_U16)))
@@ -156,7 +156,7 @@
                     sox_fail_errno(ft,SOX_EFMT,"ALSA driver does not support unsigned word samples");
                     return SOX_EOF;
                 }
-                *fmt = SND_PCM_FORMAT_U16_LE;
+                *fmt = SND_PCM_FORMAT_U16;
                 break;
             default:
                     break;