#include "util/log.h" #include "SoundSystem.h" #include using namespace crepe; SoundSystem & SoundSystem::instance() { static SoundSystem instance; return instance; } std::unique_ptr SoundSystem::sound(const std::string & src) { auto res = std::make_unique(src); return SoundSystem::sound(std::move(res)); } std::unique_ptr SoundSystem::sound(std::unique_ptr res) { Sound * out = new Sound(std::move(res)); return std::unique_ptr(out); } SoundSystem::SoundSystem() { dbg_trace(); engine.init(); } SoundSystem::~SoundSystem() { dbg_trace(); engine.deinit(); }