[MPlayer-dev-eng] [PATCH] AC3/DTS passthrough for Mac OS X

Ulion ulion2002 at gmail.com
Thu Oct 11 06:00:49 CEST 2007


2007/10/11, Nicolas Plourde <nicolas.plourde at gmail.com>:
>
> On 16-Sep-07, at 8:12 AM, Ulion wrote:
>
> > 2007/9/16, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> >
> > Let me explain.
> > When we use digital output, passthrough to s/pdif, all data transfered
> > by the audio chain is encoded data, its volume can not be adjusted by
> > any way, unless decode the data and adjust volume then re-encoded the
> > data, that's not worth. So when we doing passthrough, audio volume
> > will not allow to be changed.
> > When the control request to set a volume, if return false, we got this
> > log and mplayer dead:
> >
> > [Mixer] No hardware mixing, inserting volume filter.
> > [libaf] Adding filter volume
> > [libaf] Adding filter format
> > [format] Sample format big-endian AC3 not yet supported
> >
> > Only return true made the expected result.
> >
> >
> > When the control request to get a volume, I tried return false for get
> > volume, it works and mixer return a dummy volume to the caller, it's
> > an acceptable behavior, fixed.
> >
> > fixed patch is here.
> >
>
> applied
>
> ====
> Nicolas Plourde <nicolas.plourde at gmail.com>

That's great! Thank you.

And a little bug in my last posted patch, here's the fix:

Index: libao2/ao_macosx.c
===================================================================
--- libao2/ao_macosx.c  (revision 24762)
+++ libao2/ao_macosx.c  (working copy)
@@ -712,7 +712,7 @@
 #else
     if (ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian)
 #endif
-        ao_msg(MSGT_AO, MSGL_WARN, "output stream has a no-native
byte-order, digital output may failed.\n", (char *)&err);
+        ao_msg(MSGT_AO, MSGL_WARN, "output stream has a no-native
byte-order, digital output may failed.\n");

     /* For ac3/dts, just use packet size 6144 bytes as chunk size. */
     ao->chunk_size = ao->stream_format.mBytesPerPacket;


-- 
Ulion



More information about the MPlayer-dev-eng mailing list