add effects control (WIP)

This commit is contained in:
MihailRis 2025-02-19 22:22:00 +03:00
parent 923c694ab4
commit 743e178f0a
3 changed files with 67 additions and 27 deletions

29
src/audio/effects.hpp Normal file
View 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;
};
}