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
e6e801c3
Commit
e6e801c3
authored
May 16, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wasapi: improve format negotiation
parent
752bdd98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
modules/audio_output/wasapi.c
modules/audio_output/wasapi.c
+6
-8
No files found.
modules/audio_output/wasapi.c
View file @
e6e801c3
...
@@ -166,22 +166,21 @@ static void vlc_ToWave(WAVEFORMATEXTENSIBLE *restrict wf,
...
@@ -166,22 +166,21 @@ static void vlc_ToWave(WAVEFORMATEXTENSIBLE *restrict wf,
{
{
switch
(
audio
->
i_format
)
switch
(
audio
->
i_format
)
{
{
#if 0
case VLC_CODEC_FL32:
case
VLC_CODEC_FL64
:
case
VLC_CODEC_FL64
:
audio
->
i_format
=
VLC_CODEC_FL32
;
case
VLC_CODEC_FL32
:
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
;
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
;
break
;
break
;
case
VLC_CODEC_S8
:
case
VLC_CODEC_S8
:
case
VLC_CODEC_U8
:
audio
->
i_format
=
VLC_CODEC_S16N
;
case
VLC_CODEC_S16N
:
case
VLC_CODEC_S16N
:
case VLC_CODEC_S24N:
case VLC_CODEC_S32N:
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_PCM
;
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_PCM
;
break
;
break
;
#endif
default:
default:
audio
->
i_format
=
VLC_CODEC_FL32
;
audio
->
i_format
=
VLC_CODEC_FL32
;
audio
->
i_rate
=
48000
;
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
;
wf
->
SubFormat
=
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
;
break
;
break
;
}
}
...
@@ -297,7 +296,7 @@ static int Open(vlc_object_t *obj)
...
@@ -297,7 +296,7 @@ static int Open(vlc_object_t *obj)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
/*
Select audio device
*/
/*
Get audio device according to policy
*/
IMMDeviceEnumerator
*
devs
;
IMMDeviceEnumerator
*
devs
;
hr
=
CoCreateInstance
(
&
CLSID_MMDeviceEnumerator
,
NULL
,
CLSCTX_ALL
,
hr
=
CoCreateInstance
(
&
CLSID_MMDeviceEnumerator
,
NULL
,
CLSCTX_ALL
,
&
IID_IMMDeviceEnumerator
,
(
void
**
)
&
devs
);
&
IID_IMMDeviceEnumerator
,
(
void
**
)
&
devs
);
...
@@ -307,7 +306,6 @@ static int Open(vlc_object_t *obj)
...
@@ -307,7 +306,6 @@ static int Open(vlc_object_t *obj)
goto
error
;
goto
error
;
}
}
/* TODO: support selecting a device from config? */
IMMDevice
*
dev
;
IMMDevice
*
dev
;
hr
=
IMMDeviceEnumerator_GetDefaultAudioEndpoint
(
devs
,
eRender
,
hr
=
IMMDeviceEnumerator_GetDefaultAudioEndpoint
(
devs
,
eRender
,
eConsole
,
&
dev
);
eConsole
,
&
dev
);
...
...
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