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
50eb6474
Commit
50eb6474
authored
Nov 11, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wasapi: fix indentation
parent
445d8bc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
35 deletions
+34
-35
modules/audio_output/wasapi.c
modules/audio_output/wasapi.c
+34
-35
No files found.
modules/audio_output/wasapi.c
View file @
50eb6474
...
...
@@ -540,41 +540,40 @@ static void vlc_ToWave(WAVEFORMATEXTENSIBLE *restrict wf,
audio
->
i_format
=
VLC_CODEC_FL32
;
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
;
break
;
}
aout_FormatPrepare
(
audio
);
wf
->
Format
.
wFormatTag
=
WAVE_FORMAT_EXTENSIBLE
;
wf
->
Format
.
nChannels
=
audio
->
i_channels
;
wf
->
Format
.
nSamplesPerSec
=
audio
->
i_rate
;
wf
->
Format
.
nAvgBytesPerSec
=
audio
->
i_bytes_per_frame
*
audio
->
i_rate
;
wf
->
Format
.
nBlockAlign
=
audio
->
i_bytes_per_frame
;
wf
->
Format
.
wBitsPerSample
=
audio
->
i_bitspersample
;
wf
->
Format
.
cbSize
=
sizeof
(
*
wf
)
-
sizeof
(
wf
->
Format
);
wf
->
Samples
.
wValidBitsPerSample
=
audio
->
i_bitspersample
;
wf
->
dwChannelMask
=
0
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_LEFT
)
wf
->
dwChannelMask
|=
SPEAKER_FRONT_LEFT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_RIGHT
)
wf
->
dwChannelMask
|=
SPEAKER_FRONT_RIGHT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_CENTER
)
wf
->
dwChannelMask
|=
SPEAKER_FRONT_CENTER
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_LFE
)
wf
->
dwChannelMask
|=
SPEAKER_LOW_FREQUENCY
;
// TODO: reorder
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_REARLEFT
)
wf
->
dwChannelMask
|=
SPEAKER_BACK_LEFT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_REARRIGHT
)
wf
->
dwChannelMask
|=
SPEAKER_BACK_RIGHT
;
/* ... */
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_REARCENTER
)
wf
->
dwChannelMask
|=
SPEAKER_BACK_CENTER
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_MIDDLELEFT
)
wf
->
dwChannelMask
|=
SPEAKER_SIDE_LEFT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_MIDDLERIGHT
)
wf
->
dwChannelMask
|=
SPEAKER_SIDE_RIGHT
;
/* ... */
}
aout_FormatPrepare
(
audio
);
wf
->
Format
.
wFormatTag
=
WAVE_FORMAT_EXTENSIBLE
;
wf
->
Format
.
nChannels
=
audio
->
i_channels
;
wf
->
Format
.
nSamplesPerSec
=
audio
->
i_rate
;
wf
->
Format
.
nAvgBytesPerSec
=
audio
->
i_bytes_per_frame
*
audio
->
i_rate
;
wf
->
Format
.
nBlockAlign
=
audio
->
i_bytes_per_frame
;
wf
->
Format
.
wBitsPerSample
=
audio
->
i_bitspersample
;
wf
->
Format
.
cbSize
=
sizeof
(
*
wf
)
-
sizeof
(
wf
->
Format
);
wf
->
Samples
.
wValidBitsPerSample
=
audio
->
i_bitspersample
;
wf
->
dwChannelMask
=
0
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_LEFT
)
wf
->
dwChannelMask
|=
SPEAKER_FRONT_LEFT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_RIGHT
)
wf
->
dwChannelMask
|=
SPEAKER_FRONT_RIGHT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_CENTER
)
wf
->
dwChannelMask
|=
SPEAKER_FRONT_CENTER
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_LFE
)
wf
->
dwChannelMask
|=
SPEAKER_LOW_FREQUENCY
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_REARLEFT
)
wf
->
dwChannelMask
|=
SPEAKER_BACK_LEFT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_REARRIGHT
)
wf
->
dwChannelMask
|=
SPEAKER_BACK_RIGHT
;
/* ... */
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_REARCENTER
)
wf
->
dwChannelMask
|=
SPEAKER_BACK_CENTER
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_MIDDLELEFT
)
wf
->
dwChannelMask
|=
SPEAKER_SIDE_LEFT
;
if
(
audio
->
i_physical_channels
&
AOUT_CHAN_MIDDLERIGHT
)
wf
->
dwChannelMask
|=
SPEAKER_SIDE_RIGHT
;
/* ... */
}
static
int
vlc_FromWave
(
const
WAVEFORMATEX
*
restrict
wf
,
...
...
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