X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fbuffer.h;h=b9020ee907253a09f1c39acf2494122930425b5c;hb=e234533bcbf344880666599f7cdf15b131bbbe77;hp=00d1addca856811f1c3a8d75577d31d07f7b52db;hpb=35ea5cc8d1eb8c806885d27441548f630e7b1266;p=libs%2Fal.git diff --git a/source/buffer.h b/source/buffer.h index 00d1add..b9020ee 100644 --- a/source/buffer.h +++ b/source/buffer.h @@ -2,7 +2,7 @@ This file is part of libmspal Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Diestributed under the LGPL +Distributed under the LGPL */ #ifndef MSP_AL_BUFFER_H_ @@ -10,14 +10,32 @@ Diestributed 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 &); };