old-bannertool/source/pc/wav.h
Dorian Wouters 21ee45095b Fix header include guards names
Symbols starting with two underscores are reserved, as per the C
standard.
2016-01-27 16:49:48 +01:00

40 lines
No EOL
550 B
C

#ifndef WAV_H
#define WAV_H
#include <stdio.h>
#include "../types.h"
typedef struct {
char chunkId[4];
u32 chunkSize;
char format[4];
} Riff;
typedef struct {
char chunkId[4];
u32 chunkSize;
u16 format;
u16 numChannels;
u32 sampleRate;
u32 byteRate;
u16 align;
u16 bitsPerSample;
} Format;
typedef struct {
char chunkId[4];
u32 chunkSize;
u8* data;
} Data;
typedef struct {
Riff riff;
Format format;
Data data;
} WAV;
WAV* wav_read(FILE* fd);
void wav_free(WAV* wav);
#endif