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
5c9733cf
Commit
5c9733cf
authored
Feb 05, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audioqueue: fix compilation for OSX
parent
1d0ffadb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+6
-10
No files found.
modules/audio_output/audioqueue.c
View file @
5c9733cf
...
...
@@ -31,8 +31,12 @@
#import <vlc_plugin.h>
#import <vlc_aout.h>
#import <AudioToolBox/AudioQueue.h>
#import <AudioToolBox/AudioSession.h>
#import <TargetConditionals.h>
#if TARGET_OS_IPHONE
#import <AudioToolBox/AudioSession.h>
#else
#define AudioSessionSetActive(x)
#endif
#pragma mark -
#pragma mark private declarations
...
...
@@ -138,7 +142,6 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
msg_Dbg
(
p_aout
,
"New AudioQueue instance created (status = %li)"
,
error
);
if
(
error
!=
noErr
)
return
VLC_EGENERIC
;
fmt
->
i_format
=
VLC_CODEC_FL32
;
fmt
->
i_physical_channels
=
AOUT_CHANS_STEREO
;
aout_FormatPrepare
(
fmt
);
...
...
@@ -154,7 +157,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
if
(
error
!=
noErr
)
return
VLC_EGENERIC
;
#if
def
TARGET_OS_IPHONE
#if TARGET_OS_IPHONE
// start audio session so playback continues if mute switch is on
AudioSessionInitialize
(
NULL
,
kCFRunLoopCommonModes
,
...
...
@@ -171,15 +174,12 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
p_aout
->
play
=
Play
;
p_aout
->
pause
=
Pause
;
p_aout
->
flush
=
Flush
;
return
VLC_SUCCESS
;
}
static
void
Stop
(
audio_output_t
*
p_aout
)
{
#ifdef TARGET_OS_IPHONE
AudioSessionSetActive
(
false
);
#endif
p_aout
->
sys
->
i_played_length
=
0
;
AudioQueueDisposeTimeline
(
p_aout
->
sys
->
audioQueueRef
,
p_aout
->
sys
->
timelineRef
);
...
...
@@ -226,14 +226,10 @@ static void Pause(audio_output_t *p_aout, bool pause, mtime_t date)
if
(
pause
)
{
AudioQueuePause
(
p_aout
->
sys
->
audioQueueRef
);
#ifdef TARGET_OS_IPHONE
AudioSessionSetActive
(
false
);
#endif
}
else
{
AudioQueueStart
(
p_aout
->
sys
->
audioQueueRef
,
NULL
);
#ifdef TARGET_OS_IPHONE
AudioSessionSetActive
(
true
);
#endif
}
}
...
...
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