X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuffer.h;h=b9020ee907253a09f1c39acf2494122930425b5c;hb=2ff6e1cc7fcae3099b127a886360d7919a4b3efa;hp=f7ac307da7b644ff8f79eec80f81b90d02e2fce5;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f;p=libs%2Fal.git diff --git a/source/buffer.h b/source/buffer.h index f7ac307..b9020ee 100644 --- a/source/buffer.h +++ b/source/buffer.h @@ -10,14 +10,32 @@ Distributed under the LGPL #include #include +#include #include "format.h" #include "types.h" namespace Msp { namespace AL { +class Sound; + +/** +Buffers are used to store audio data and feed it into a Source. +*/ class Buffer { +public: + class Loader: public DataFile::Loader + { + private: + Buffer &buf; + + public: + Loader(Buffer &); + private: + void sound_data(const std::string &); + }; + private: uint id; @@ -27,6 +45,7 @@ public: uint get_id() const { return id; } void data(Format, const void *, sizei, sizei); + void data(const Sound &); void load_data(const std::string &); };