Commit 5e59f5f4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

auhal: replace deprecated CarbonCore calls introduced in Component Manager 3.0...

auhal: replace deprecated CarbonCore calls introduced in Component Manager 3.0 back in 1994 with their modern counterparts

requires 10.6 or later
parent c7c00fa3
......@@ -84,7 +84,7 @@ struct aout_sys_t
TPCircularBuffer circular_buffer; /* circular buffer to swap the audio data */
/* AUHAL specific */
Component au_component; /* The Audiocomponent we use */
AudioComponent au_component; /* The AudioComponent we use */
AudioUnit au_unit; /* The AudioUnit we use */
/* CoreAudio SPDIF mode specific */
......@@ -289,7 +289,7 @@ static int OpenAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
OSStatus err = noErr;
UInt32 i_param_size = 0;
int i_original;
ComponentDescription desc;
AudioComponentDescription desc;
AudioStreamBasicDescription DeviceFormat;
AudioChannelLayout *layout;
AudioChannelLayout new_layout;
......@@ -303,13 +303,13 @@ static int OpenAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
p_sys->au_component = FindNextComponent(NULL, &desc);
p_sys->au_component = AudioComponentFindNext(NULL, &desc);
if (p_sys->au_component == NULL) {
msg_Warn(p_aout, "we cannot find our HAL component");
return false;
}
err = OpenAComponent(p_sys->au_component, &p_sys->au_unit);
err = AudioComponentInstanceNew(p_sys->au_component, &p_sys->au_unit);
if (err != noErr) {
msg_Warn(p_aout, "we cannot open our HAL component");
return false;
......@@ -844,7 +844,7 @@ static void Stop(audio_output_t *p_aout)
if (p_sys->au_unit) {
verify_noerr(AudioOutputUnitStop(p_sys->au_unit));
verify_noerr(AudioUnitUninitialize(p_sys->au_unit));
verify_noerr(CloseComponent(p_sys->au_unit));
verify_noerr(AudioComponentInstanceDispose(p_sys->au_unit));
}
if (p_sys->b_digital) {
......
Markdown is supported
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