]> git.tdb.fi Git - libs/al.git/blob - source/waveform.h
Use Msp::IO in SoundDecoder
[libs/al.git] / source / waveform.h
1 #ifndef MSP_AL_WAVEFORM_H_
2 #define MSP_AL_WAVEFORM_H_
3
4 #include <string>
5 #include <msp/io/seekable.h>
6 #include "format.h"
7
8 namespace Msp {
9 namespace AL {
10
11 class SoundDecoder;
12
13 class Waveform
14 {
15 private:
16         Format format;
17         unsigned freq;
18         unsigned size;
19         char *data;
20
21 public:
22         Waveform();
23         ~Waveform();
24
25         void load_file(const std::string &);
26         void load_io(IO::Seekable &);
27         void load(SoundDecoder &);
28
29         Format get_format() const { return format; }
30         unsigned get_frequency() const { return freq; }
31         unsigned get_size() const { return size; }
32         const char *get_data() const { return data; }
33 };
34
35 } // namespace AL
36 } // namespace Msp
37
38 #endif