[MPlayer-dev-eng] [PATCH] Coreaudio patches (audio device selection and deprecated functions)

Diego Biurrun diego at biurrun.de
Sun Apr 18 14:36:51 CEST 2010


On Sat, Apr 17, 2010 at 10:26:50PM +0200, Adrian Stutz wrote:
> On Sat, Apr 17, 2010 at 22:25, Adrian Stutz <adrian at sttz.ch> wrote:
> > Hello list,
> 
> Oh, and maybe you're interested in the actual patches...

:)

> +++ libao2/ao_coreaudio.c	(working copy)
> @@ -200,7 +200,7 @@
>  
>  static void print_format(int lev, const char* str, const AudioStreamBasicDescription *f){
>      uint32_t flags=(uint32_t) f->mFormatFlags;
> -    ao_msg(MSGT_AO,lev, "%s %7.1fHz %lubit [%c%c%c%c][%lu][%lu][%lu][%lu][%lu] %s %s %s%s%s%s\n",
> +    ao_msg(MSGT_AO,lev, "%s %7.1fHz %"PRIu32"bit [%c%c%c%c][%"PRIu32"][%"PRIu32"][%"PRIu32"][%"PRIu32"][%"PRIu32"] %s %s %s%s%s%s\n",
>  	    str, f->mSampleRate, f->mBitsPerChannel,
> @@ -302,7 +302,7 @@
>  
> -        ao_msg(MSGT_AO,MSGL_V, "got default audio output device ID: %#lx Name: %s\n", devid_def, psz_name );
> +        ao_msg(MSGT_AO,MSGL_V, "got default audio output device ID: %"PRIu32" Name: %s\n", devid_def, psz_name );

Looks good.

> --- libao2/ao_coreaudio.c	2010-04-17 21:46:25.000000000 +0200
> +++ libao2/ao_coreaudio_2.c	2010-04-17 21:47:24.000000000 +0200
> @@ -74,6 +74,8 @@
> @@ -217,6 +219,91 @@
>  
> +static OSStatus GetAudioProperty(AudioObjectID id, AudioObjectPropertySelector selector, UInt32 outSize, void *outData) {

Please break overly long lines and use K&R function
declarations ('{' on the next line).

> --- DOCS/man/en/mplayer.1	2010-04-17 21:57:27.000000000 +0200
> +++ DOCS/man/en/mplayer.1	2010-04-17 21:55:47.000000000 +0200
> @@ -2812,6 +2812,14 @@
>  .B coreaudio (Mac OS X only)
>  native Mac OS X audio output driver
> +.PD 0
> +.RSs
> +.IPs device_id=<id>
> +ID of output device to use (0 = default device)
> +.IPs help
> +List all available output devices with their ids.

IDs

Do you want to maintain this ao driver?  You already maintain the rest
of the OS X stuff...

Diego



More information about the MPlayer-dev-eng mailing list