[MPlayer-dev-eng] [PATCH RESEND] Mac OS X: fix libao2 compilation on Mac OS X 10.4
Aaro Koskinen
aaro.koskinen at iki.fi
Fri Dec 10 22:48:55 CET 2010
Hello,
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.
A.
Index: libao2/ao_coreaudio.c
===================================================================
--- 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().
+ */
+#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. */
More information about the MPlayer-dev-eng
mailing list