audio: Added basic WAVE_FORMAT_EXTENSIBLE support to .wav loader.

This is just enough to get you through a file that just used the extended
header for float or int data. It doesn't handle all the other things that
you expect from this header, like 24-bit samples inside a 32-bit container
or speaker masks.
This commit is contained in:
Ryan C. Gordon
2017-02-17 02:25:37 -05:00
parent 4a0b287def
commit e8677a1bd2
2 changed files with 33 additions and 0 deletions

View File

@@ -38,6 +38,7 @@
#define IEEE_FLOAT_CODE 0x0003
#define IMA_ADPCM_CODE 0x0011
#define MP3_CODE 0x0055
#define EXTENSIBLE_CODE 0xFFFE
#define WAVE_MONO 1
#define WAVE_STEREO 2
@@ -64,4 +65,13 @@ typedef struct Chunk
Uint8 *data;
} Chunk;
typedef struct WaveExtensibleFMT
{
WaveFMT format;
Uint16 size;
Uint16 validbits;
Uint32 channelmask;
Uint8 subformat[16]; /* a GUID. */
} WaveExtensibleFMT;
/* vi: set ts=4 sw=4 expandtab: */