[vlc-commits] auhal: replace deprecated CarbonCore calls introduced in Component Manager 3. 0 back in 1994 with their modern counterparts

Felix Paul Kühne git at videolan.org
Wed Jan 23 00:35:19 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jan 23 00:35:00 2013 +0100| [5e59f5f48dac111013b48a0afc22fdc8f4e627f4] | committer: Felix Paul Kühne

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

requires 10.6 or later

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e59f5f48dac111013b48a0afc22fdc8f4e627f4
---

 modules/audio_output/auhal.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 25df2e2..620ded4 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -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) {



More information about the vlc-commits mailing list