aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade')
-rw-r--r--src/crepe/facade/Sound.cpp5
-rw-r--r--src/crepe/facade/Sound.h2
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
*