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
c857bce3
Commit
c857bce3
authored
Sep 20, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wave Microsoft formats: avoid to redefine things twice
parent
1b034fc6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
31 deletions
+8
-31
include/vlc_codecs.h
include/vlc_codecs.h
+6
-4
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+1
-1
modules/audio_output/windows_audio_common.h
modules/audio_output/windows_audio_common.h
+1
-26
No files found.
include/vlc_codecs.h
View file @
c857bce3
...
@@ -79,11 +79,13 @@ ATTR_PACKED
...
@@ -79,11 +79,13 @@ ATTR_PACKED
_WAVEFORMATEXTENSIBLE
{
_WAVEFORMATEXTENSIBLE
{
WAVEFORMATEX
Format
;
WAVEFORMATEX
Format
;
union
{
union
{
uint16_t
wValidBitsPerSample
;
uint16_t
wValidBitsPerSample
;
/* bits of precision */
uint16_t
wSamplesPerBlock
;
uint16_t
wSamplesPerBlock
;
/* valid if wBitsPerSample==0 */
uint16_t
wReserved
;
uint16_t
wReserved
;
/* If neither applies, set to zero. */
}
Samples
;
}
Samples
;
uint32_t
dwChannelMask
;
uint32_t
dwChannelMask
;
/* Channels present */
GUID
SubFormat
;
GUID
SubFormat
;
}
WAVEFORMATEXTENSIBLE
,
*
PWAVEFORMATEXTENSIBLE
;
}
WAVEFORMATEXTENSIBLE
,
*
PWAVEFORMATEXTENSIBLE
;
#endif
/* _WAVEFORMATEXTENSIBLE_ */
#endif
/* _WAVEFORMATEXTENSIBLE_ */
...
...
modules/audio_output/waveout.c
View file @
c857bce3
...
@@ -505,7 +505,7 @@ static int OpenWaveOut( audio_output_t *p_aout, uint32_t i_device_id, int i_form
...
@@ -505,7 +505,7 @@ static int OpenWaveOut( audio_output_t *p_aout, uint32_t i_device_id, int i_form
waveformat
.
Samples
.
wValidBitsPerSample
);
waveformat
.
Samples
.
wValidBitsPerSample
);
msg_Dbg
(
p_aout
,
"waveformat.Samples.wSamplesPerBlock = %d"
,
msg_Dbg
(
p_aout
,
"waveformat.Samples.wSamplesPerBlock = %d"
,
waveformat
.
Samples
.
wSamplesPerBlock
);
waveformat
.
Samples
.
wSamplesPerBlock
);
msg_Dbg
(
p_aout
,
"waveformat.dwChannelMask = %
lx
"
,
msg_Dbg
(
p_aout
,
"waveformat.dwChannelMask = %
u
"
,
waveformat
.
dwChannelMask
);
waveformat
.
dwChannelMask
);
}
}
...
...
modules/audio_output/windows_audio_common.h
View file @
c857bce3
...
@@ -34,17 +34,7 @@
...
@@ -34,17 +34,7 @@
#define INITGUID
/* Doesn't define the DEFINE_GUID as extern */
#define INITGUID
/* Doesn't define the DEFINE_GUID as extern */
#include <initguid.h>
#include <initguid.h>
#ifndef WAVE_FORMAT_IEEE_FLOAT
#include <vlc_codecs.h>
# define WAVE_FORMAT_IEEE_FLOAT 0x0003
#endif
#ifndef WAVE_FORMAT_DOLBY_AC3_SPDIF
# define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092
#endif
#ifndef WAVE_FORMAT_EXTENSIBLE
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
#endif
DEFINE_GUID
(
_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
,
WAVE_FORMAT_IEEE_FLOAT
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
,
WAVE_FORMAT_IEEE_FLOAT
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
_KSDATAFORMAT_SUBTYPE_PCM
,
WAVE_FORMAT_PCM
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
_KSDATAFORMAT_SUBTYPE_PCM
,
WAVE_FORMAT_PCM
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
...
@@ -54,23 +44,8 @@ static const GUID __KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = {WAVE_FORMAT_IEEE_FLOAT, 0
...
@@ -54,23 +44,8 @@ static const GUID __KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = {WAVE_FORMAT_IEEE_FLOAT, 0
static
const
GUID
__KSDATAFORMAT_SUBTYPE_PCM
=
{
WAVE_FORMAT_PCM
,
0x0000
,
0x0010
,
{
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
}};
static
const
GUID
__KSDATAFORMAT_SUBTYPE_PCM
=
{
WAVE_FORMAT_PCM
,
0x0000
,
0x0010
,
{
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
}};
static
const
GUID
__KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF
=
{
WAVE_FORMAT_DOLBY_AC3_SPDIF
,
0x0000
,
0x0010
,
{
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
}};
static
const
GUID
__KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF
=
{
WAVE_FORMAT_DOLBY_AC3_SPDIF
,
0x0000
,
0x0010
,
{
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
}};
#define FRAMES_NUM 8
/* Needs to be > 3 */
#define FRAMES_NUM 8
/* Needs to be > 3 */
#ifndef _WAVEFORMATEXTENSIBLE_
typedef
struct
{
WAVEFORMATEX
Format
;
union
{
WORD
wValidBitsPerSample
;
/* bits of precision */
WORD
wSamplesPerBlock
;
/* valid if wBitsPerSample==0 */
WORD
wReserved
;
/* If neither applies, set to zero. */
}
Samples
;
DWORD
dwChannelMask
;
/* which channels are */
/* present in stream */
GUID
SubFormat
;
}
WAVEFORMATEXTENSIBLE
,
*
PWAVEFORMATEXTENSIBLE
;
#endif
#include <dsound.h>
#include <dsound.h>
#ifndef SPEAKER_FRONT_LEFT
#ifndef SPEAKER_FRONT_LEFT
...
...
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