ao_coreaudio: fix compilation on OS X 10.4.

This version is the last OS version available for certain classes of
PPC Macs, but it lacks AudioDeviceIOProcID, so it has to be emulated.

patch by Aaro Koskinen, aaro.koskinen iki fi

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32770 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2011-01-07 21:30:14 +00:00 committed by Uoti Urpala
parent d1d8892fdf
commit 659c500084
1 changed files with 15 additions and 0 deletions

View File

@ -68,6 +68,21 @@ LIBAO_EXTERN(coreaudio)
/* 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(). */
#define AudioDeviceIOProcID AudioDeviceIOProc
#define AudioDeviceDestroyIOProcID AudioDeviceRemoveIOProc
static OSStatus AudioDeviceCreateIOProcID(AudioDeviceID dev,
AudioDeviceIOProc proc,
void *data,
AudioDeviceIOProcID *procid)
{
*procid = proc;
return AudioDeviceAddIOProc(dev, proc, data);
}
#endif
typedef struct ao_coreaudio_s
{
AudioDeviceID i_selected_dev; /* Keeps DeviceID of the selected device. */