diff options
Diffstat (limited to 'src/crepe/Sound.cpp')
-rw-r--r-- | src/crepe/Sound.cpp | 10 |
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()); } |