Commit c857bce3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Wave Microsoft formats: avoid to redefine things twice

parent 1b034fc6
...@@ -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_ */
......
...@@ -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);
} }
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment