Commit 4082c803 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

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

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