Commit e0d7c431 authored by Kyle McKay's avatar Kyle McKay 💬
Browse files

ao_macosx.c: restore compatibility with older Mac OS X versions



The newer function names are not available until Mac OS X 10.6.0.

However, the newer function names are just a simple rename of the
older functions with exactly the same arguments.

If the build target is prior to Mac OS X 10.6.0 (where the new
function names became available) add a few backwards compatibility
defines to allow the source to build on older Mac OS X versions.

Newer systems will continue to use the new names and avoid the
ugly deprecation warnings while builds for older systems will
just work.
Signed-off-by: Kyle McKay's avatarKyle J. McKay <mackyle@gmail.com>
parent e0510fc9
Pipeline #2341 passed with stage
in 49 seconds
......@@ -33,6 +33,7 @@
audio samples rather than having them pushed at it (which is nice
when you are wanting to do good buffering of audio). */
#include <AvailabilityMacros.h>
#include <CoreAudio/CoreAudio.h>
#include <CoreServices/CoreServices.h>
#include <AudioUnit/AudioUnit.h>
......@@ -43,6 +44,18 @@
#include "ao/ao.h"
#include "ao/plugin.h"
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
#define AudioComponent Component
#define AudioComponentDescription ComponentDescription
#define AudioComponentFindNext FindNextComponent
#define AudioComponentInstanceNew OpenAComponent
#define AudioComponentInstanceDispose CloseComponent
#endif
#define DEFAULT_BUFFER_TIME (250);
#ifndef MIN
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment