[MPlayer-dev-eng] [PATCH] Mac OS X Audio with AudioUnits and AudioToolbox format converters

Chris Roccati roccati at pobox.com
Sun May 29 16:03:50 CEST 2005


Hello,
after some fiddling, it became apparent (to me, atleast) that using  
the "raw" CoreAudio for audio output is not going to work in all  
cases, and "fixing" it is troublesome: for example changing the  
sample rate takes a random amount of time, because all the  
applications involved in audio output must be notified, all the  
conversion filter chains must be rebuilt and so on. The way  
ao_macosx.c handles that simply can't be fixed.

This patch proposes a move from the "raw" CoreAudio to the AudioUnit 
+AudioToolbox frameworks.
The change provides several advantages, for example a better  
cooperation with other audio playing applications and (potential)  
usage of hardware accelerated sample rate and sample format conversion.

(Atleast with my hardware case, the "clicks" in AC3 conversion are  
gone too.)

The changed files are:

libao2/ao_macosx.c
use AudioUnits instead CoreAudio and provide sample rate and format  
conversion via AudioToolbox

configure
added the -framework AudioUnits and -framework AudioToolbox to the  
list of required frameworks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ao_macosx_audiounits.patch
Type: application/octet-stream
Size: 18758 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050529/0dd24079/attachment.obj>


More information about the MPlayer-dev-eng mailing list