summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/CoreAudioSoundStream.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-11-25 00:42:21 -0500
committercomex <comexk@gmail.com>2014-11-25 00:42:21 -0500
commitb36b55cfcb7d2cab7c3bb08e72f57a75199e2b70 (patch)
tree6a2b1af0567d9c953fbd4d8e32defc3fa369b950 /Source/Core/AudioCommon/CoreAudioSoundStream.cpp
parent759ea3bce73a5743eb977f2c72972619664b161e (diff)
Upgrade AudioUnit API usage.
weird that such a simple change doesn't seem to have any obvious documentation on Apple's website or elsewhere...
Diffstat (limited to 'Source/Core/AudioCommon/CoreAudioSoundStream.cpp')
-rw-r--r--Source/Core/AudioCommon/CoreAudioSoundStream.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/AudioCommon/CoreAudioSoundStream.cpp b/Source/Core/AudioCommon/CoreAudioSoundStream.cpp
index cfe6bc6e16..3bfd517708 100644
--- a/Source/Core/AudioCommon/CoreAudioSoundStream.cpp
+++ b/Source/Core/AudioCommon/CoreAudioSoundStream.cpp
@@ -32,22 +32,22 @@ bool CoreAudioSound::Start()
OSStatus err;
AURenderCallbackStruct callback_struct;
AudioStreamBasicDescription format;
- ComponentDescription desc;
- Component component;
+ AudioComponentDescription desc;
+ AudioComponent component;
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
- component = FindNextComponent(nullptr, &desc);
+ component = AudioComponentFindNext(nullptr, &desc);
if (component == nullptr)
{
ERROR_LOG(AUDIO, "error finding audio component");
return false;
}
- err = OpenAComponent(component, &audioUnit);
+ err = AudioComponentInstanceNew(component, &audioUnit);
if (err != noErr)
{
ERROR_LOG(AUDIO, "error opening audio component");
@@ -131,7 +131,7 @@ void CoreAudioSound::Stop()
if (err != noErr)
ERROR_LOG(AUDIO, "error uninitializing audiounit");
- err = CloseComponent(audioUnit);
+ err = AudioComponentInstanceDispose(audioUnit);
if (err != noErr)
ERROR_LOG(AUDIO, "error closing audio component");
}