diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-01-07 21:30:14 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-31 16:03:10 +0200 |
commit | 659c50008485bf74911c4db92abc9152920a99cb (patch) | |
tree | d432236d0d2a0d36827bf43bd8c3b4cc3347f459 | |
parent | d1d8892fdfe9a669fe1723319f68133dddea9981 (diff) | |
download | mpv-659c50008485bf74911c4db92abc9152920a99cb.tar.bz2 mpv-659c50008485bf74911c4db92abc9152920a99cb.tar.xz |
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
-rw-r--r-- | libao2/ao_coreaudio.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index 010d869445..cf43800659 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -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. */ |