diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 19:57:45 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 19:57:45 +0100 |
commit | add8724446fdeae1aaec9b07544cf7a5475a9bfe (patch) | |
tree | 7c51cf0d65f8f0d906a0abe2b29bad916dcf83e8 /src/crepe/facade | |
parent | ab0b4923c4f49e7a28f6d17e994d3e013ca344bb (diff) |
ResourceManager working + tested
Diffstat (limited to 'src/crepe/facade')
-rw-r--r-- | src/crepe/facade/Sound.cpp | 5 | ||||
-rw-r--r-- | src/crepe/facade/Sound.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/crepe/facade/Sound.cpp b/src/crepe/facade/Sound.cpp index 4eefcda..b589759 100644 --- a/src/crepe/facade/Sound.cpp +++ b/src/crepe/facade/Sound.cpp @@ -11,6 +11,7 @@ Sound::Sound(const Asset & src) : Resource(src) { this->sample.load(src.get_path().c_str()); dbg_trace(); } +Sound::~Sound() { dbg_trace(); } void Sound::play() { SoundContext & ctx = this->context.get(); @@ -52,3 +53,7 @@ void Sound::set_looping(bool looping) { ctx.engine.setLooping(this->handle, this->looping); } +void Sound::set_context(SoundContext & ctx) { + this->context = ctx; +} + diff --git a/src/crepe/facade/Sound.h b/src/crepe/facade/Sound.h index 6f8462a..94b1996 100644 --- a/src/crepe/facade/Sound.h +++ b/src/crepe/facade/Sound.h @@ -1,6 +1,5 @@ #pragma once -#include <memory> #include <soloud/soloud.h> #include <soloud/soloud_wav.h> @@ -20,6 +19,7 @@ class SoundContext; class Sound : public Resource { public: Sound(const Asset & src); + ~Sound(); // dbg_trace /** * \brief Pause this sample * |