mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add effects control (WIP)
This commit is contained in:
parent
923c694ab4
commit
743e178f0a
3 changed files with 67 additions and 27 deletions
29
src/audio/effects.hpp
Normal file
29
src/audio/effects.hpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
#include <optional>
|
||||
|
||||
namespace audio {
|
||||
struct Effect {
|
||||
struct Property {
|
||||
using Value = std::variant<float, int>;
|
||||
int id;
|
||||
Value def;
|
||||
Value min;
|
||||
Value max;
|
||||
};
|
||||
std::map<std::string, Property> properties;
|
||||
};
|
||||
|
||||
class EffectControl {
|
||||
public:
|
||||
EffectControl(const Effect* effect) : effect(effect) {};
|
||||
virtual ~EffectControl() = default;
|
||||
|
||||
virtual void set(const std::string& name, Effect::Property::Value value) = 0;
|
||||
protected:
|
||||
const Effect* effect = nullptr;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue