Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
a6b38c73
Commit
a6b38c73
authored
Jun 05, 2005
by
hartman
Browse files
* modules/audio_output/auhal.c: Make speaker config assumptions if the speaker layout is not set.
parent
f7bc314e
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/audio_output/auhal.c
View file @
a6b38c73
...
...
@@ -293,7 +293,37 @@ static int Open( vlc_object_t * p_this )
continue
;
default:
msg_Warn
(
p_aout
,
"Unrecognized channel form provided by driver: %d"
,
(
int
)
layout
->
mChannelDescriptions
[
i
].
mChannelLabel
);
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
switch
(
layout
->
mNumberChannelDescriptions
)
{
/* We make assumptions based on number of channels here.
* Unfortunatly Apple has provided no 100% method to retrieve the speaker configuration */
case
1
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_CENTER
;
break
;
case
4
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
break
;
case
6
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_LFE
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
break
;
case
7
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_LFE
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_REARCENTER
;
break
;
case
8
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_LFE
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
break
;
case
2
:
default:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
}
break
;
}
}
...
...
Write
Preview
Supports
Markdown
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