Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
4082c803
Commit
4082c803
authored
Mar 19, 2008
by
Pierre d'Herbemont
Browse files
auhal: Replace deprecated Add/RemoveProc calls by Create/DestroyProcID calls.
parent
af929d56
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/audio_output/auhal.c
View file @
4082c803
...
...
@@ -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
=
AudioDevice
Remove
IOProc
(
p_sys
->
i_selected_dev
,
(
AudioDeviceIOProc
)
RenderCallbackSPDIF
);
err
=
AudioDevice
Destroy
IOProc
ID
(
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
=
AudioDevice
Remove
IOProc
(
p_sys
->
i_selected_dev
,
(
AudioDeviceIOProc
)
RenderCallbackSPDIF
);
err
=
AudioDevice
Destroy
IOProc
ID
(
p_sys
->
i_selected_dev
,
p_sys
->
procId
);
if
(
err
!=
noErr
)
{
msg_Err
(
p_aout
,
"AudioDeviceRemoveIOProc failed: [%4.4s]"
,
(
char
*
)
&
err
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment