]> git.tdb.fi Git - libs/al.git/blobdiff - source/buffer.h
Bump version for release
[libs/al.git] / source / buffer.h
index f7ac307da7b644ff8f79eec80f81b90d02e2fce5..b9020ee907253a09f1c39acf2494122930425b5c 100644 (file)
@@ -10,14 +10,32 @@ Distributed under the LGPL
 
 #include <string>
 #include <AL/al.h>
+#include <msp/datafile/loader.h>
 #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 &);
 };