Files
lime/project/include/audio/format/WAV.h
2014-08-02 10:33:32 -07:00

57 lines
792 B
C++

#ifndef LIME_AUDIO_FORMAT_WAV_H
#define LIME_AUDIO_FORMAT_WAV_H
#include <audio/AudioBuffer.h>
#include <utils/Resource.h>
namespace lime {
struct RIFF_Header {
char chunkID[4];
unsigned int chunkSize; //size not including chunkSize or chunkID
char format[4];
};
struct WAVE_Format {
char subChunkID[4];
unsigned int subChunkSize;
short audioFormat;
short numChannels;
unsigned int sampleRate;
unsigned int byteRate;
short blockAlign;
short bitsPerSample;
};
struct WAVE_Data {
char subChunkID[4]; //should contain the word data
unsigned int subChunkSize; //Stores the size of the data block
};
class WAV {
public:
static bool Decode (Resource *resource, AudioBuffer *audioBuffer);
};
}
#endif