]> git.tdb.fi Git - libs/al.git/blob - source/streamer.h
Bump version for release
[libs/al.git] / source / streamer.h
1 /* $Id$
2
3 This file is part of libmspal
4 Copyright © 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_AL_STREAMER_H_
9 #define MSP_AL_STREAMER_H_
10
11 #include <list>
12 #include "source.h"
13
14 namespace Msp {
15 namespace AL {
16
17 class Sound;
18 class Buffer;
19
20 /**
21 A streamer transfers data from a Sound to a Source.  It is permanently attached
22 to the same Source, but can play multiple Sounds during its lifetime.  A single
23 Sound can only be played by one Streamer at a time.
24 */
25 class Streamer
26 {
27 private:
28         Source &src;
29         Sound  *snd;
30         std::list<Buffer *> buffers;
31
32 public:
33         Streamer(Source &);
34         ~Streamer();
35
36         void play(Sound &);
37         void stop();
38         void tick();
39 };
40
41 } // namespace AL
42 } // namespace Msp
43
44 #endif