[MPlayer-dev-eng] [patch] fix playback of 8-bit audio when sndio ao is used

Alexandre Ratchov alex at caoua.org
Mon Feb 17 19:18:23 CET 2014


Hi,

This diff unbreaks playback of u8 audio. AFAIU, the endianness bit
must be set to AF_FORMAT_NE for 8-bit formats.

Index: libao2/ao_sndio.c
===================================================================
--- libao2/ao_sndio.c	(revision 36873)
+++ libao2/ao_sndio.c	(working copy)
@@ -132,6 +132,8 @@
     ao_data.format |= par.sig ? AF_FORMAT_SI : AF_FORMAT_US;
     if (par.bits > 8)
         ao_data.format |= par.le ? AF_FORMAT_LE : AF_FORMAT_BE;
+    else
+        ao_data.format |= AF_FORMAT_NE;
     ao_data.channels = par.pchan;
     ao_data.bps = bpf * par.rate;
     ao_data.buffersize = par.bufsz * bpf;


More information about the MPlayer-dev-eng mailing list