Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3e3e5b51
Commit
3e3e5b51
authored
Apr 30, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auhal: add support for 8.0 and 8.1 output (close #8536)
parent
6424a7eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
11 deletions
+61
-11
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+61
-11
No files found.
modules/audio_output/auhal.c
View file @
3e3e5b51
...
@@ -554,6 +554,28 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
...
@@ -554,6 +554,28 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
memset
(
&
new_layout
,
0
,
sizeof
(
new_layout
));
memset
(
&
new_layout
,
0
,
sizeof
(
new_layout
));
uint32_t
chans_out
[
AOUT_CHAN_MAX
];
uint32_t
chans_out
[
AOUT_CHAN_MAX
];
/* Some channel abbreviations used below:
* L - left
* R - right
* C - center
* Ls - left surround
* Rs - right surround
* Cs - center surround
* Rls - rear left surround
* Rrs - rear right surround
* Lw - left wide
* Rw - right wide
* Lsd - left surround direct
* Rsd - right surround direct
* Lc - left center
* Rc - right center
* Ts - top surround
* Vhl - vertical height left
* Vhc - vertical height center
* Vhr - vertical height right
* Lt - left matrix total. for matrix encoded stereo.
* Rt - right matrix total. for matrix encoded stereo. */
switch
(
aout_FormatNbChannels
(
fmt
))
{
switch
(
aout_FormatNbChannels
(
fmt
))
{
case
1
:
case
1
:
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_Mono
;
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_Mono
;
...
@@ -588,7 +610,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
...
@@ -588,7 +610,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_AudioUnit_6_0
;
// L R Ls Rs C Cs
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_AudioUnit_6_0
;
// L R Ls Rs C Cs
break
;
break
;
case
7
:
case
7
:
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_MPEG_6_1_A
;
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_MPEG_6_1_A
;
// L R C LFE Ls Rs Cs
chans_out
[
0
]
=
AOUT_CHAN_LEFT
;
chans_out
[
0
]
=
AOUT_CHAN_LEFT
;
chans_out
[
1
]
=
AOUT_CHAN_RIGHT
;
chans_out
[
1
]
=
AOUT_CHAN_RIGHT
;
...
@@ -604,21 +626,49 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
...
@@ -604,21 +626,49 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
break
;
break
;
case
8
:
case
8
:
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_MPEG_7_1_A
;
if
(
fmt
->
i_physical_channels
&
(
AOUT_CHAN_LFE
))
{
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_MPEG_7_1_A
;
// L R C LFE Ls Rs Lc Rc
chans_out
[
0
]
=
AOUT_CHAN_LEFT
;
chans_out
[
1
]
=
AOUT_CHAN_RIGHT
;
chans_out
[
2
]
=
AOUT_CHAN_CENTER
;
chans_out
[
3
]
=
AOUT_CHAN_LFE
;
chans_out
[
4
]
=
AOUT_CHAN_MIDDLELEFT
;
chans_out
[
5
]
=
AOUT_CHAN_MIDDLERIGHT
;
chans_out
[
6
]
=
AOUT_CHAN_REARLEFT
;
chans_out
[
7
]
=
AOUT_CHAN_REARRIGHT
;
}
else
{
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_DTS_8_0_B
;
// Lc C Rc L R Ls Cs Rs
chans_out
[
0
]
=
AOUT_CHAN_MIDDLELEFT
;
chans_out
[
1
]
=
AOUT_CHAN_CENTER
;
chans_out
[
2
]
=
AOUT_CHAN_MIDDLERIGHT
;
chans_out
[
3
]
=
AOUT_CHAN_LEFT
;
chans_out
[
4
]
=
AOUT_CHAN_RIGHT
;
chans_out
[
5
]
=
AOUT_CHAN_REARLEFT
;
chans_out
[
6
]
=
AOUT_CHAN_REARCENTER
;
chans_out
[
7
]
=
AOUT_CHAN_REARRIGHT
;
}
p_aout
->
sys
->
chans_to_reorder
=
aout_CheckChannelReorder
(
NULL
,
chans_out
,
fmt
->
i_physical_channels
,
p_aout
->
sys
->
chan_table
);
if
(
p_aout
->
sys
->
chans_to_reorder
)
msg_Dbg
(
p_aout
,
"channel reordering needed for 7.1 / 8.0 output"
);
chans_out
[
0
]
=
AOUT_CHAN_LEFT
;
break
;
chans_out
[
1
]
=
AOUT_CHAN_RIGHT
;
case
9
:
chans_out
[
2
]
=
AOUT_CHAN_CENTER
;
new_layout
.
mChannelLayoutTag
=
kAudioChannelLayoutTag_DTS_8_1_B
;
// Lc C Rc L R Ls Cs Rs LFE
chans_out
[
3
]
=
AOUT_CHAN_LFE
;
chans_out
[
0
]
=
AOUT_CHAN_MIDDLELEFT
;
chans_out
[
4
]
=
AOUT_CHAN_MIDDLELEFT
;
chans_out
[
1
]
=
AOUT_CHAN_CENTER
;
chans_out
[
5
]
=
AOUT_CHAN_MIDDLERIGHT
;
chans_out
[
2
]
=
AOUT_CHAN_MIDDLERIGHT
;
chans_out
[
6
]
=
AOUT_CHAN_REARLEFT
;
chans_out
[
3
]
=
AOUT_CHAN_LEFT
;
chans_out
[
4
]
=
AOUT_CHAN_RIGHT
;
chans_out
[
5
]
=
AOUT_CHAN_REARLEFT
;
chans_out
[
6
]
=
AOUT_CHAN_REARCENTER
;
chans_out
[
7
]
=
AOUT_CHAN_REARRIGHT
;
chans_out
[
7
]
=
AOUT_CHAN_REARRIGHT
;
chans_out
[
8
]
=
AOUT_CHAN_LFE
;
p_aout
->
sys
->
chans_to_reorder
=
aout_CheckChannelReorder
(
NULL
,
chans_out
,
fmt
->
i_physical_channels
,
p_aout
->
sys
->
chan_table
);
p_aout
->
sys
->
chans_to_reorder
=
aout_CheckChannelReorder
(
NULL
,
chans_out
,
fmt
->
i_physical_channels
,
p_aout
->
sys
->
chan_table
);
if
(
p_aout
->
sys
->
chans_to_reorder
)
if
(
p_aout
->
sys
->
chans_to_reorder
)
msg_Dbg
(
p_aout
,
"channel reordering needed for 7.1 output"
);
msg_Dbg
(
p_aout
,
"channel reordering needed for 8.1 output"
);
break
;
break
;
}
}
...
...
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