X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuffer.h;h=d84e46a021d4f0eaedb070cdf4c73cce3ec71541;hb=14008b157c64752ba7c1cef831124992c35c4646;hp=f7ac307da7b644ff8f79eec80f81b90d02e2fce5;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f;p=libs%2Fal.git diff --git a/source/buffer.h b/source/buffer.h index f7ac307..d84e46a 100644 --- a/source/buffer.h +++ b/source/buffer.h @@ -1,23 +1,34 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_AL_BUFFER_H_ #define MSP_AL_BUFFER_H_ #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 +38,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 &); };