Use fixed-size types for the WAV header struct

This matches the WAVEFORMATEX struct
This commit is contained in:
Clownacy 2020-07-08 16:35:09 +01:00
parent d6bbb013f9
commit 92ce7aeb5d

View file

@ -300,19 +300,19 @@ int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no)
// when it only needs a WAVEFORMATEX // when it only needs a WAVEFORMATEX
typedef struct WavHeader typedef struct WavHeader
{ {
char riff[4]; CHAR riff[4];
unsigned long wav_size; DWORD wav_size;
char wave[4]; CHAR wave[4];
char fmt[4]; CHAR fmt[4];
unsigned long fmt_chunk_size; DWORD fmt_chunk_size;
unsigned short audio_format; WORD audio_format;
unsigned short num_channels; WORD num_channels;
unsigned long sample_rate; DWORD sample_rate;
unsigned long byte_rate; DWORD byte_rate;
unsigned short sample_alignment; WORD sample_alignment;
unsigned short bit_depth; WORD bit_depth;
char data[4]; CHAR data[4];
unsigned long data_bytes; DWORD data_bytes;
} WavHeader; } WavHeader;
int sample_count; int sample_count;