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
dd306ec4
Commit
dd306ec4
authored
Apr 05, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auhal: fix device setup when no spidf available
refs #8286
parent
39c57090
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+13
-5
No files found.
modules/audio_output/auhal.c
View file @
dd306ec4
...
...
@@ -233,6 +233,8 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
* property size */
int
b_alive
=
false
;
bool
b_start_digital
=
false
;
p_sys
=
p_aout
->
sys
;
p_sys
->
b_digital
=
false
;
p_sys
->
au_component
=
NULL
;
...
...
@@ -247,9 +249,6 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
aout_FormatPrint
(
p_aout
,
"VLC is looking for:"
,
fmt
);
if
(
p_sys
->
b_selected_dev_is_digital
)
msg_Dbg
(
p_aout
,
"audio device supports digital output"
);
msg_Dbg
(
p_aout
,
"attempting to use device %i"
,
p_sys
->
i_selected_dev
);
/* Check if the desired device is alive and usable */
...
...
@@ -267,10 +266,19 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
}
if
(
!
b_alive
)
{
msg_Warn
(
p_aout
,
"selected audio device is not alive, switching to default device
"
);
msg_Warn
(
p_aout
,
"selected audio device is not alive, switching to default device
with id %i"
,
p_sys
->
i_default_dev
);
p_sys
->
i_selected_dev
=
p_sys
->
i_default_dev
;
p_sys
->
b_selected_dev_is_digital
=
false
;
}
// recheck if device still supports digital
b_start_digital
=
p_sys
->
b_selected_dev_is_digital
;
if
(
!
AudioDeviceSupportsDigital
(
p_aout
,
p_sys
->
i_selected_dev
))
b_start_digital
=
false
;
if
(
b_start_digital
)
msg_Dbg
(
p_aout
,
"Use audio device for digital output"
);
/* add a callback to see if the device dies later on */
err
=
AudioObjectAddPropertyListener
(
p_sys
->
i_selected_dev
,
&
audioDeviceAliveAddress
,
HardwareListener
,
(
void
*
)
p_aout
);
if
(
err
!=
noErr
)
{
...
...
@@ -302,7 +310,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
bool
b_success
=
false
;
/* Check for Digital mode or Analog output mode */
if
(
AOUT_FMT_SPDIF
(
fmt
)
&&
p_sys
->
b_selected_dev_is
_digital
)
{
if
(
AOUT_FMT_SPDIF
(
fmt
)
&&
b_start
_digital
)
{
if
(
StartSPDIF
(
p_aout
,
fmt
))
{
msg_Dbg
(
p_aout
,
"digital output successfully opened"
);
b_success
=
true
;
...
...
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