aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-01 15:21:31 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-01 15:21:31 +0200
commitde288a859a631acf6aac10fad825cafaa3744dc9 (patch)
tree9e32e46498256c5215cbe4f293f99c3bf95128e2
parent90174919ba8c019d4b88915557be0adc3769b3e6 (diff)
fix audio segfault
-rw-r--r--src/crepe/Sound.cpp2
-rw-r--r--src/crepe/Sound.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/crepe/Sound.cpp b/src/crepe/Sound.cpp
index 09ffd5f..136a71d 100644
--- a/src/crepe/Sound.cpp
+++ b/src/crepe/Sound.cpp
@@ -16,7 +16,7 @@ Sound::Sound(const char * src) {
}
void Sound::load(std::unique_ptr<api::Resource> res) {
- this->sample.load(this->res->canonical());
+ this->sample.load(res->canonical());
}
void Sound::play() {
diff --git a/src/crepe/Sound.h b/src/crepe/Sound.h
index 163c5b4..9da17b9 100644
--- a/src/crepe/Sound.h
+++ b/src/crepe/Sound.h
@@ -60,7 +60,6 @@ private:
void load(std::unique_ptr<api::Resource> res);
private:
- std::unique_ptr<api::Resource> res;
SoLoud::Wav sample;
SoLoud::handle handle;
};