X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsound.h;fp=source%2Fsound.h;h=0e15a40dc3fdccfc13b671af18660d778f7cd4a2;hb=35ea5cc8d1eb8c806885d27441548f630e7b1266;hp=0000000000000000000000000000000000000000;hpb=ddb247cf59f06eb477c3a2420da6d721e58c2914;p=libs%2Fal.git diff --git a/source/sound.h b/source/sound.h new file mode 100644 index 0000000..0e15a40 --- /dev/null +++ b/source/sound.h @@ -0,0 +1,43 @@ +/* $Id$ + +This file is part of libmspal +Copyright © 2008 Mikko Rasa, Mikkosoft Productions +Diestributed under the LGPL +*/ + +#ifndef MSP_AL_SOUND_H_ +#define MSP_AL_SOUND_H_ + +#include +#include "format.h" + +namespace Msp { +namespace AL { + +class Sound +{ +private: + OggVorbis_File ovfile; + unsigned freq; + unsigned size; + char *data; + Format format; + +public: + Sound(); + ~Sound(); + + void open(const std::string &); + void load_data(); + void load(const std::string &); + Format get_format() const { return format; } + unsigned get_frequency() const { return freq; } + unsigned get_size() const { return size; } + const char *get_data() const; + unsigned read(char *, unsigned); +}; + +} // namespace AL +} // namespace Msp + +#endif