X-Git-Url: http://git.tdb.fi/?p=libs%2Fal.git;a=blobdiff_plain;f=source%2Fsound.h;h=1badf3c03a9d01ff03f211daf539579278faec3b;hp=e903bcb395acf185df355f444793557a4c590b2f;hb=58dc1e7c15f928d0f861a20c46f2be4112bf5baf;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f diff --git a/source/sound.h b/source/sound.h index e903bcb..1badf3c 100644 --- a/source/sound.h +++ b/source/sound.h @@ -8,6 +8,7 @@ Distributed under the LGPL #ifndef MSP_AL_SOUND_H_ #define MSP_AL_SOUND_H_ +#include #include #include "format.h" @@ -22,19 +23,26 @@ private: unsigned size; char *data; Format format; + unsigned read_pos; + bool eof_flag; public: Sound(); + Sound(const std::string &); ~Sound(); void open(const std::string &); void load_data(); void load(const std::string &); + void close(); + void rewind(); + unsigned read(char *, unsigned); + bool eof() const { return eof_flag; } + 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