[MPlayer-dev-eng] [PATCH RESEND] Mac OS X: fixlibao2 compilation on Mac OS X 10.4
Sean McGovern
gseanmcg at gmail.com
Wed Dec 15 14:51:23 CET 2010
I seem to recall this file was specifically updated for 10.5+ as the old structures were being deprecated.
-- Sean
-----Original Message-----
From: Diego Biurrun <diego at biurrun.de>
Sender: mplayer-dev-eng-bounces at mplayerhq.hu
Date: Wed, 15 Dec 2010 14:19:31
To: <mplayer-dev-eng at mplayerhq.hu>
Reply-To: mplayer-dev-eng at mplayerhq.hu
Subject: Re: [MPlayer-dev-eng] [PATCH RESEND] Mac OS X: fix
libao2 compilation on Mac OS X 10.4
On Fri, Dec 10, 2010 at 11:48:55PM +0200, Aaro Koskinen wrote:
>
> The patch below fixes mplayer compilation on Mac OS X 10.4 (it has been
> broken since r31713). Please apply - it should not change anything on
> newer Mac OS X versions.
Apparently you do actually use 10.4, but - I'm curious - why?
I have yet to meet a Mac user that hasn't updated to 10.5 at least...
> --- libao2/ao_coreaudio.c (revision 32667)
> +++ libao2/ao_coreaudio.c (working copy)
> @@ -68,6 +68,23 @@
> /* Prefix for all mp_msg() calls */
> #define ao_msg(a, b, c...) mp_msg(a, b, "AO: [coreaudio] " c)
>
> +#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
> +/*
> + * AudioDeviceIOProcID does not exist in Mac OS X 10.4. We can emulate this
> + * by using AudioDeviceAddIOProc() and AudioDeviceRemoveIOProc().
Wouldn't it be more portable to implement it this way for all OS X versions?
> + */
> +#define AudioDeviceIOProcID AudioDeviceIOProc
> +#define AudioDeviceDestroyIOProcID AudioDeviceRemoveIOProc
> +static OSStatus AudioDeviceCreateIOProcID(AudioDeviceID dev,
> + AudioDeviceIOProc proc,
> + void *data,
> + AudioDeviceIOProcID *procid)
> +{
> + *procid = proc;
> + return AudioDeviceAddIOProc(dev, proc, data);
Why the procid variable indirection?
> +}
> +#endif
> +
> typedef struct ao_coreaudio_s
> {
Please place your function below the struct declaration.
Diego
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
More information about the MPlayer-dev-eng
mailing list