Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
5482b9b0
Commit
5482b9b0
authored
Mar 21, 2012
by
Philippe Coent
Committed by
Felix Paul Kühne
Mar 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AudioQueue: fixed compilation
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
a44507ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+26
-3
No files found.
modules/audio_output/audioqueue.c
View file @
5482b9b0
...
...
@@ -36,6 +36,7 @@
#include <AudioToolBox/AudioToolBox.h>
#define NUMBER_OF_BUFFERS 3
#define FRAME_SIZE 2048
/*****************************************************************************
* aout_sys_t: AudioQueue audio output method descriptor
...
...
@@ -132,6 +133,22 @@ static int Open ( vlc_object_t *p_this )
return
VLC_SUCCESS
;
}
/*****************************************************************************
* aout_FifoPop : get the next buffer out of the FIFO
*****************************************************************************/
static
aout_buffer_t
*
aout_FifoPop2
(
aout_fifo_t
*
p_fifo
)
{
aout_buffer_t
*
p_buffer
=
p_fifo
->
p_first
;
if
(
p_buffer
!=
NULL
)
{
p_fifo
->
p_first
=
p_buffer
->
p_next
;
if
(
p_fifo
->
p_first
==
NULL
)
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
}
return
p_buffer
;
}
/*****************************************************************************
* Close: close the audio device
*****************************************************************************/
...
...
@@ -153,9 +170,15 @@ void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferR
aout_buffer_t
*
p_buffer
=
NULL
;
if
(
p_aout
)
{
vlc_mutex_lock
(
&
p_aout
->
lock
);
p_buffer
=
aout_FifoPop
(
&
p_aout
->
fifo
);
vlc_mutex_unlock
(
&
p_aout
->
lock
);
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
aout_packet_t
*
packet
=
&
p_sys
->
packet
;
if
(
packet
)
{
vlc_mutex_lock
(
&
packet
->
lock
);
p_buffer
=
aout_FifoPop2
(
&
packet
->
fifo
);
vlc_mutex_unlock
(
&
packet
->
lock
);
}
}
if
(
p_buffer
!=
NULL
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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