[vlc-devel] commit: auhal: Replace deprecated Add/RemoveProc calls by Create/ DestroyProcID calls. (Pierre d'Herbemont )

git version control git at videolan.org
Wed Mar 19 13:45:04 CET 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed Mar 19 13:17:46 2008 +0100| [4082c803f778e903ae0b1dc9afaf3ad86fddbd69]

auhal: Replace deprecated Add/RemoveProc calls by Create/DestroyProcID calls.

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

 modules/audio_output/auhal.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index f56dc5c..f8ab8ee 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -25,7 +25,7 @@
  * Preamble
  *****************************************************************************/
 #include <unistd.h>
-#include <sys/time.h>
+#include <sys/time.h> /* gettimeofday() */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -87,6 +87,7 @@ struct aout_sys_t
     uint8_t                     p_remainder_buffer[BUFSIZE];
     uint32_t                    i_read_bytes;
     uint32_t                    i_total_bytes;
+    AudioDeviceIOProcID         procId;
 
     /* CoreAudio SPDIF mode specific */
     pid_t                       i_hog_pid;      /* The keep the pid of our hog status */
@@ -784,9 +785,10 @@ static int OpenSPDIF( aout_instance_t * p_aout )
     aout_VolumeNoneInit( p_aout );
 
     /* Add IOProc callback */
-    err = AudioDeviceAddIOProc( p_sys->i_selected_dev,
-                                (AudioDeviceIOProc)RenderCallbackSPDIF,
-                                (void *)p_aout );
+    err = AudioDeviceCreateIOProcID( p_sys->i_selected_dev,
+                                    (AudioDeviceIOProc)RenderCallbackSPDIF,
+                                    (void *)p_aout,
+                                    &p_sys->procId);
     if( err != noErr )
     {
         msg_Err( p_aout, "AudioDeviceAddIOProc failed: [%4.4s]", (char *)&err );
@@ -804,8 +806,8 @@ static int OpenSPDIF( aout_instance_t * p_aout )
     {
         msg_Err( p_aout, "AudioDeviceStart failed: [%4.4s]", (char *)&err );
 
-        err = AudioDeviceRemoveIOProc( p_sys->i_selected_dev,
-                                       (AudioDeviceIOProc)RenderCallbackSPDIF );
+        err = AudioDeviceDestroyIOProcID( p_sys->i_selected_dev,
+                                          p_sys->procId );
         if( err != noErr )
         {
             msg_Err( p_aout, "AudioDeviceRemoveIOProc failed: [%4.4s]", (char *)&err );
@@ -845,8 +847,8 @@ static void Close( vlc_object_t * p_this )
         }
 
         /* Remove IOProc callback */
-        err = AudioDeviceRemoveIOProc( p_sys->i_selected_dev,
-                                       (AudioDeviceIOProc)RenderCallbackSPDIF );
+        err = AudioDeviceDestroyIOProcID( p_sys->i_selected_dev,
+                                          p_sys->procId );
         if( err != noErr )
         {
             msg_Err( p_aout, "AudioDeviceRemoveIOProc failed: [%4.4s]", (char *)&err );




More information about the vlc-devel mailing list