]> git.tdb.fi Git - libs/al.git/blob - source/buffer.h
Two more atribute setting functions in Source
[libs/al.git] / source / buffer.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_BUFFER_H_
9 #define MSP_AL_BUFFER_H_
10
11 #include <string>
12 #include <AL/al.h>
13 #include <msp/datafile/loader.h>
14 #include "format.h"
15 #include "types.h"
16
17 namespace Msp {
18 namespace AL {
19
20 class Sound;
21
22 class Buffer
23 {
24 public:
25         class Loader: public DataFile::Loader
26         {
27         private:
28                 Buffer &buf;
29
30         public:
31                 Loader(Buffer &);
32         private:
33                 void sound_data(const std::string &);
34         };
35
36 private:
37         uint id;
38
39 public:
40         Buffer();
41         ~Buffer();
42
43         uint get_id() const { return id; }
44         void data(Format, const void *, sizei, sizei);
45         void data(const Sound &);
46         void load_data(const std::string &);
47 };
48
49 } // namespace AL
50 } // namespace Msp
51
52 #endif