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
807a6c9a
Commit
807a6c9a
authored
Nov 29, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wasapi: fix channel order mask
parent
b05a4450
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
modules/audio_output/wasapi.c
modules/audio_output/wasapi.c
+17
-4
No files found.
modules/audio_output/wasapi.c
View file @
807a6c9a
...
...
@@ -635,12 +635,12 @@ static int vlc_FromWave(const WAVEFORMATEX *restrict wf,
audio_sample_format_t
*
restrict
audio
)
{
audio
->
i_rate
=
wf
->
nSamplesPerSec
;
audio
->
i_physical_channels
=
0
;
if
(
wf
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
const
WAVEFORMATEXTENSIBLE
*
wfe
=
(
void
*
)
wf
;
audio
->
i_physical_channels
=
0
;
for
(
unsigned
i
=
0
;
chans_in
[
i
];
i
++
)
if
(
wfe
->
dwChannelMask
&
chans_in
[
i
])
audio
->
i_physical_channels
|=
pi_vlc_chan_order_wg4
[
i
];
...
...
@@ -654,6 +654,20 @@ static int vlc_FromWave(const WAVEFORMATEX *restrict wf,
return
0
;
}
static
unsigned
vlc_CheckWaveOrder
(
const
WAVEFORMATEX
*
restrict
wf
,
uint8_t
*
restrict
table
)
{
uint32_t
mask
=
0
;
if
(
wf
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
const
WAVEFORMATEXTENSIBLE
*
wfe
=
(
void
*
)
wf
;
mask
=
wfe
->
dwChannelMask
;
}
return
aout_CheckChannelReorder
(
chans_in
,
chans_out
,
mask
,
table
);
}
static
wchar_t
*
var_InheritWide
(
vlc_object_t
*
obj
,
const
char
*
name
)
{
char
*
v8
=
var_InheritString
(
obj
,
name
);
...
...
@@ -811,9 +825,8 @@ retry:
else
assert
(
pwf
==
NULL
);
sys
->
chans_to_reorder
=
aout_CheckChannelReorder
(
chans_in
,
chans_out
,
fmt
->
i_physical_channels
,
sys
->
chans_table
);
sys
->
chans_to_reorder
=
vlc_CheckWaveOrder
((
hr
==
S_OK
)
?
&
wf
.
Format
:
pwf
,
sys
->
chans_table
);
sys
->
bits
=
fmt
->
i_bitspersample
;
hr
=
IAudioClient_Initialize
(
sys
->
client
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
...
...
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