diff options
Diffstat (limited to 'src/crepe/Sound.h')
-rw-r--r-- | src/crepe/Sound.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/crepe/Sound.h b/src/crepe/Sound.h new file mode 100644 index 0000000..ac4b7f4 --- /dev/null +++ b/src/crepe/Sound.h @@ -0,0 +1,30 @@ +#pragma once + +#include <soloud.h> + +#include <memory> + +#include "api/Resource.h" + +namespace crepe { + +class Sound { +public: + Sound(std::unique_ptr<api::Resource> res); + virtual ~Sound() = default; + +public: + void pause(); + void play(); + void rewind(); + void set_volume(float volume); + void set_looping(bool looping); + +private: + std::unique_ptr<api::Resource> _res; + SoLoud::handle _handle; + bool _paused; +}; + +} + |