diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 18:04:03 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 18:04:03 +0100 |
commit | ab0b4923c4f49e7a28f6d17e994d3e013ca344bb (patch) | |
tree | b385693017be292b8f4862e88b912dba7c6be619 /src/crepe/facade/Sound.h | |
parent | 213f947d0907858cace470736c15f87caa934591 (diff) |
more WIP audio system + utilities
Diffstat (limited to 'src/crepe/facade/Sound.h')
-rw-r--r-- | src/crepe/facade/Sound.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crepe/facade/Sound.h b/src/crepe/facade/Sound.h index 8342b46..6f8462a 100644 --- a/src/crepe/facade/Sound.h +++ b/src/crepe/facade/Sound.h @@ -4,6 +4,7 @@ #include <soloud/soloud.h> #include <soloud/soloud_wav.h> +#include "../util/OptionalRef.h" #include "../Resource.h" namespace crepe { @@ -18,6 +19,7 @@ class SoundContext; */ class Sound : public Resource { public: + Sound(const Asset & src); /** * \brief Pause this sample * @@ -72,13 +74,12 @@ public: bool get_looping() const { return this->looping; } public: - Sound(SoundContext & ctx); - std::unique_ptr<Resource> clone(const Asset & src) const override; + void set_context(SoundContext & ctx); private: SoLoud::Wav sample; SoLoud::handle handle; - SoundContext & context; + OptionalRef<SoundContext> context; float volume = 1.0f; bool looping = false; |