diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 12:33:59 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 12:33:59 +0100 |
commit | 9d58e897fb68ab8dd001a5085cde2fae4634c274 (patch) | |
tree | b70c33c6343be56a536c0b639435a45a1d2429ed /src/crepe/facade/Sound.h | |
parent | 87c74782e486647c46f9ca4d2f857094006e563c (diff) |
move some files from `loek/tests` to `loek/audio`
Diffstat (limited to 'src/crepe/facade/Sound.h')
-rw-r--r-- | src/crepe/facade/Sound.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/crepe/facade/Sound.h b/src/crepe/facade/Sound.h index e5b2f19..183bd7c 100644 --- a/src/crepe/facade/Sound.h +++ b/src/crepe/facade/Sound.h @@ -4,13 +4,11 @@ #include <soloud/soloud.h> #include <soloud/soloud_wav.h> -#include "../Resource.h" +#include "../Asset.h" namespace crepe { -class SoundContext; - -class Sound : public Resource { +class Sound { public: /** * \brief Pause this sample @@ -66,13 +64,15 @@ public: bool get_looping() const { return this->looping; } public: - Sound(SoundContext & ctx); - std::unique_ptr<Resource> clone(const Asset & src) const override; + Sound(const char * src); + Sound(std::unique_ptr<Asset> res); + +private: + void load(std::unique_ptr<Asset> res); private: SoLoud::Wav sample; SoLoud::handle handle; - SoundContext & context; float volume = 1.0f; bool looping = false; |