X-Git-Url: http://git.tdb.fi/?p=libs%2Fal.git;a=blobdiff_plain;f=source%2Fwaveform.h;fp=source%2Fwaveform.h;h=c1f0a2d7ff3421b9409bb15974ef5173bd5494e1;hp=0000000000000000000000000000000000000000;hb=6cc0f1735a00e8f9eb80ff0c9468fb67205f6d20;hpb=17948408eafd48ea529acd0a70cc45fc5973cb10 diff --git a/source/waveform.h b/source/waveform.h new file mode 100644 index 0000000..c1f0a2d --- /dev/null +++ b/source/waveform.h @@ -0,0 +1,37 @@ +#ifndef MSP_AL_WAVEFORM_H_ +#define MSP_AL_WAVEFORM_H_ + +#include +#include "format.h" + +namespace Msp { +namespace AL { + +class SoundDecoder; + +class Waveform +{ +private: + Format format; + unsigned freq; + unsigned size; + char *data; + +public: + Waveform(); + ~Waveform(); + + void load_file(const std::string &); + void load_memory(const void *, unsigned); + void load(SoundDecoder &); + + Format get_format() const { return format; } + unsigned get_frequency() const { return freq; } + unsigned get_size() const { return size; } + const char *get_data() const { return data; } +}; + +} // namespace AL +} // namespace Msp + +#endif