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
10a5990d
Commit
10a5990d
authored
Dec 16, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AudioQueue: fix 'Flush' implementation
parent
a249b33b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+13
-5
No files found.
modules/audio_output/audioqueue.c
View file @
10a5990d
...
...
@@ -46,6 +46,7 @@
struct
aout_sys_t
{
AudioQueueRef
audioQueue
;
bool
b_stopped
;
};
/*****************************************************************************
...
...
@@ -111,6 +112,8 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
fmt
->
i_rate
=
44100
;
aout_FormatPrepare
(
fmt
);
p_aout
->
sys
->
b_stopped
=
false
;
status
=
AudioQueueStart
(
p_sys
->
audioQueue
,
NULL
);
msg_Dbg
(
p_aout
,
"Starting AudioQueue (status = %i)"
,
status
);
...
...
@@ -131,12 +134,12 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
static
void
Stop
(
audio_output_t
*
p_aout
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
p_aout
->
sys
->
b_stopped
=
true
;
msg_Dbg
(
p_aout
,
"Stopping AudioQueue"
);
AudioQueueStop
(
p_
sys
->
audioQueue
,
fals
e
);
AudioQueueStop
(
p_
aout
->
sys
->
audioQueue
,
tru
e
);
msg_Dbg
(
p_aout
,
"Disposing AudioQueue"
);
AudioQueueDispose
(
p_
sys
->
audioQueue
,
fals
e
);
AudioQueueDispose
(
p_
aout
->
sys
->
audioQueue
,
tru
e
);
}
/*****************************************************************************
...
...
@@ -185,9 +188,13 @@ static void Pause (audio_output_t *p_aout, bool pause, mtime_t date)
static
void
Flush
(
audio_output_t
*
p_aout
,
bool
wait
)
{
VLC_UNUSED
(
wait
);
if
(
p_aout
->
sys
->
b_stopped
||
!
p_aout
->
sys
->
audioQueue
)
return
;
if
(
wait
)
AudioQueueFlush
(
p_aout
->
sys
->
audioQueue
);
else
AudioQueueReset
(
p_aout
->
sys
->
audioQueue
);
}
static
int
TimeGet
(
audio_output_t
*
p_aout
,
mtime_t
*
restrict
delay
)
...
...
@@ -222,6 +229,7 @@ static int Open(vlc_object_t *obj)
static
void
Close
(
vlc_object_t
*
obj
)
{
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
msg_Dbg
(
aout
,
"audioqueue: Close"
);
aout_sys_t
*
sys
=
aout
->
sys
;
free
(
sys
);
...
...
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