add sound sfxr loaders

This commit is contained in:
2022-11-18 22:32:10 +01:00
parent 0c1a98cfd5
commit 86c52c4fac
5 changed files with 126 additions and 18 deletions

View File

@ -0,0 +1,28 @@
#pragma once
#include <memory>
#include <string>
#include <soloud_sfxr.h>
#include <nlohmann/json_fwd.hpp>
namespace MM {
// fwd
class Engine;
struct SoundLoaderSfxrPreset {
std::shared_ptr<::SoLoud::Sfxr> load(const ::SoLoud::Sfxr::SFXR_PRESETS preset, const int seed) const;
};
struct SoundLoaderSfxrJson {
std::shared_ptr<::SoLoud::Sfxr> load(const nlohmann::json& j) const;
};
struct SoundLoaderSfxrFile {
std::shared_ptr<::SoLoud::Sfxr> load(const std::string& path, MM::Engine& engine) const;
};
} // MM