aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Sound.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-09-29 17:22:58 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-09-29 17:22:58 +0200
commit90174919ba8c019d4b88915557be0adc3769b3e6 (patch)
treea89feb8c2137f4eefb22d5b09031e6826bbbfc72 /src/crepe/Sound.cpp
parente4a3ef6e324acc8edf9f0797caa244967907a676 (diff)
WIP cleanup (broken, but more like the class diagram)
Diffstat (limited to 'src/crepe/Sound.cpp')
-rw-r--r--src/crepe/Sound.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/crepe/Sound.cpp b/src/crepe/Sound.cpp
index 181366a..09ffd5f 100644
--- a/src/crepe/Sound.cpp
+++ b/src/crepe/Sound.cpp
@@ -7,7 +7,15 @@ using namespace crepe;
Sound::Sound(std::unique_ptr<api::Resource> res) {
dbg_trace();
- this->res = std::move(res);
+ this->load(std::move(res));
+}
+
+Sound::Sound(const char * src) {
+ dbg_trace();
+ this->load(std::make_unique<api::Resource>(src));
+}
+
+void Sound::load(std::unique_ptr<api::Resource> res) {
this->sample.load(this->res->canonical());
}