mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Removed Mac OS 10.5 support (bug #3137). Also fixed a warning about deprecated Carbon code when using SDL_audio (bug #3127, thanks Dominik!)
This commit is contained in:
@@ -406,13 +406,7 @@ COREAUDIO_CloseDevice(_THIS)
|
||||
AudioUnitSetProperty(this->hidden->audioUnit,
|
||||
kAudioUnitProperty_SetRenderCallback,
|
||||
scope, bus, &callback, sizeof(callback));
|
||||
|
||||
#if MACOSX_COREAUDIO
|
||||
CloseComponent(this->hidden->audioUnit);
|
||||
#else
|
||||
AudioComponentInstanceDispose(this->hidden->audioUnit);
|
||||
#endif
|
||||
|
||||
this->hidden->audioUnitOpened = 0;
|
||||
}
|
||||
SDL_free(this->hidden->buffer);
|
||||
@@ -482,13 +476,8 @@ prepare_audiounit(_THIS, void *handle, int iscapture,
|
||||
{
|
||||
OSStatus result = noErr;
|
||||
AURenderCallbackStruct callback;
|
||||
#if MACOSX_COREAUDIO
|
||||
ComponentDescription desc;
|
||||
Component comp = NULL;
|
||||
#else
|
||||
AudioComponentDescription desc;
|
||||
AudioComponent comp = NULL;
|
||||
#endif
|
||||
const AudioUnitElement output_bus = 0;
|
||||
const AudioUnitElement input_bus = 1;
|
||||
const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
|
||||
@@ -507,11 +496,10 @@ prepare_audiounit(_THIS, void *handle, int iscapture,
|
||||
|
||||
#if MACOSX_COREAUDIO
|
||||
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
|
||||
comp = FindNextComponent(NULL, &desc);
|
||||
#else
|
||||
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
||||
comp = AudioComponentFindNext(NULL, &desc);
|
||||
#endif
|
||||
comp = AudioComponentFindNext(NULL, &desc);
|
||||
|
||||
if (comp == NULL) {
|
||||
SDL_SetError("Couldn't find requested CoreAudio component");
|
||||
@@ -519,17 +507,8 @@ prepare_audiounit(_THIS, void *handle, int iscapture,
|
||||
}
|
||||
|
||||
/* Open & initialize the audio unit */
|
||||
#if MACOSX_COREAUDIO
|
||||
result = OpenAComponent(comp, &this->hidden->audioUnit);
|
||||
CHECK_RESULT("OpenAComponent");
|
||||
#else
|
||||
/*
|
||||
AudioComponentInstanceNew only available on iPhone OS 2.0 and Mac OS X 10.6
|
||||
We can't use OpenAComponent on iPhone because it is not present
|
||||
*/
|
||||
result = AudioComponentInstanceNew(comp, &this->hidden->audioUnit);
|
||||
CHECK_RESULT("AudioComponentInstanceNew");
|
||||
#endif
|
||||
|
||||
this->hidden->audioUnitOpened = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user