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
bfa8edd8
Commit
bfa8edd8
authored
Jan 25, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiounit_ios: fix audio unit handling in pause state (close #10480)
parent
945d6f4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
modules/audio_output/audiounit_ios.c
modules/audio_output/audiounit_ios.c
+14
-2
No files found.
modules/audio_output/audiounit_ios.c
View file @
bfa8edd8
...
@@ -88,6 +88,7 @@ static void Flush (audio_output_t *, bool);
...
@@ -88,6 +88,7 @@ static void Flush (audio_output_t *, bool);
static
int
TimeGet
(
audio_output_t
*
,
mtime_t
*
);
static
int
TimeGet
(
audio_output_t
*
,
mtime_t
*
);
static
OSStatus
RenderCallback
(
vlc_object_t
*
,
AudioUnitRenderActionFlags
*
,
const
AudioTimeStamp
*
,
static
OSStatus
RenderCallback
(
vlc_object_t
*
,
AudioUnitRenderActionFlags
*
,
const
AudioTimeStamp
*
,
UInt32
,
UInt32
,
AudioBufferList
*
);
UInt32
,
UInt32
,
AudioBufferList
*
);
vlc_module_begin
()
vlc_module_begin
()
set_shortname
(
"audiounit_ios"
)
set_shortname
(
"audiounit_ios"
)
set_description
(
N_
(
"AudioUnit output for iOS"
))
set_description
(
N_
(
"AudioUnit output for iOS"
))
...
@@ -328,10 +329,21 @@ static void Pause (audio_output_t *p_aout, bool pause, mtime_t date)
...
@@ -328,10 +329,21 @@ static void Pause (audio_output_t *p_aout, bool pause, mtime_t date)
p_sys
->
b_paused
=
pause
;
p_sys
->
b_paused
=
pause
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
if
(
pause
)
/* we need to start / stop the audio unit here because otherwise
* the OS won't believe us that we stopped the audio output
* so in case of an interruption, our unit would be permanently
* silenced.
* in case of multi-tasking, the multi-tasking view would still
* show a playing state despite we are paused, same for lock screen */
if
(
pause
)
{
AudioOutputUnitStop
(
p_sys
->
au_unit
);
AudioSessionSetActive
(
false
);
AudioSessionSetActive
(
false
);
else
}
else
{
AudioOutputUnitStart
(
p_sys
->
au_unit
);
UInt32
sessionCategory
=
kAudioSessionCategory_MediaPlayback
;
AudioSessionSetProperty
(
kAudioSessionProperty_AudioCategory
,
sizeof
(
sessionCategory
),
&
sessionCategory
);
AudioSessionSetActive
(
true
);
AudioSessionSetActive
(
true
);
}
}
}
static
void
Flush
(
audio_output_t
*
p_aout
,
bool
wait
)
static
void
Flush
(
audio_output_t
*
p_aout
,
bool
wait
)
...
...
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