]> git.localhorst.tv Git - blank.git/blob - src/audio/Sound.hpp
split composite model in template and instance
[blank.git] / src / audio / Sound.hpp
1 #ifndef BLANK_AUDIO_SOUND_HPP_
2 #define BLANK_AUDIO_SOUND_HPP_
3
4 #include <al.h>
5
6
7 namespace blank {
8
9 class Sound {
10
11 public:
12         Sound();
13         explicit Sound(const char *);
14         ~Sound();
15
16         Sound(Sound &&);
17         Sound &operator =(Sound &&);
18
19         Sound(const Sound &) = delete;
20         Sound &operator =(const Sound &) = delete;
21
22 public:
23         void Bind(ALuint src) const;
24
25         /// full duration in milliseconds
26         int Duration() const noexcept { return duration; }
27
28 private:
29         ALuint handle;
30         int duration;
31
32 };
33
34 }
35
36 #endif