[xiph-commits] r18289 - trunk/ao/src/plugins/alsa

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed May 16 16:36:22 PDT 2012


Author: xiphmont
Date: 2012-05-16 16:36:21 -0700 (Wed, 16 May 2012)
New Revision: 18289

Modified:
   trunk/ao/src/plugins/alsa/ao_alsa.c
Log:
Move endianness check out of playback loop in ao_also()
closes trac #1874



Modified: trunk/ao/src/plugins/alsa/ao_alsa.c
===================================================================
--- trunk/ao/src/plugins/alsa/ao_alsa.c	2012-05-16 23:30:59 UTC (rev 18288)
+++ trunk/ao/src/plugins/alsa/ao_alsa.c	2012-05-16 23:36:21 UTC (rev 18289)
@@ -616,6 +616,7 @@
 		uint_32 num_bytes)
 {
   ao_alsa_internal *internal = (ao_alsa_internal *) device->internal;
+  int endianp = ao_is_big_endian();
 
   /* eventually the 24 bit padding should be at a higher layer
      where we're doing other permutation/swizzling, but for now
@@ -630,7 +631,7 @@
       if(len4>len3)len4=len3;
       len4*=device->output_channels;
 
-      if(ao_is_big_endian())++d;
+      if(endianp)++d;
 
       for(i=0;i<len4;i++){
         memcpy(d,output_samples,3);



More information about the commits mailing list