]> git.tdb.fi Git - libs/al.git/blobdiff - source/streamer.h
Add Streamer class
[libs/al.git] / source / streamer.h
diff --git a/source/streamer.h b/source/streamer.h
new file mode 100644 (file)
index 0000000..eddd49d
--- /dev/null
@@ -0,0 +1,39 @@
+/* $Id$
+
+This file is part of libmspal
+Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_AL_STREAMER_H_
+#define MSP_AL_STREAMER_H_
+
+#include <list>
+#include "source.h"
+
+namespace Msp {
+namespace AL {
+
+class Sound;
+class Buffer;
+
+class Streamer
+{
+private:
+       Source &src;
+       Sound  *snd;
+       std::list<Buffer *> buffers;
+
+public:
+       Streamer(Source &);
+       ~Streamer();
+
+       void play(Sound &);
+       void stop();
+       void tick();
+};
+
+} // namespace AL
+} // namespace Msp
+
+#endif