mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
Implement IEditController::plainParamToNormalized
This commit is contained in:
@@ -344,6 +344,17 @@ void Vst3Logger::log_request(
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(
|
||||
bool is_host_vst,
|
||||
const YaEditController2::PlainParamToNormalized& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.instance_id
|
||||
<< ": IEditController::plainParamToNormalized(id = "
|
||||
<< request.id << ", plainValue = " << request.plain_value
|
||||
<< ")";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginBase::Initialize& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
|
||||
@@ -92,6 +92,8 @@ class Vst3Logger {
|
||||
const YaEditController2::GetParamValueByString&);
|
||||
void log_request(bool is_host_vst,
|
||||
const YaEditController2::NormalizedParamToPlain&);
|
||||
void log_request(bool is_host_vst,
|
||||
const YaEditController2::PlainParamToNormalized&);
|
||||
void log_request(bool is_host_vst, const YaPluginBase::Initialize&);
|
||||
void log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
|
||||
@@ -82,6 +82,7 @@ using ControlRequest = std::variant<Vst3PluginProxy::Construct,
|
||||
YaEditController2::GetParamStringByValue,
|
||||
YaEditController2::GetParamValueByString,
|
||||
YaEditController2::NormalizedParamToPlain,
|
||||
YaEditController2::PlainParamToNormalized,
|
||||
YaPluginBase::Initialize,
|
||||
YaPluginBase::Terminate,
|
||||
YaPluginFactory::Construct,
|
||||
|
||||
@@ -275,6 +275,28 @@ class YaEditController2 : public Steinberg::Vst::IEditController,
|
||||
virtual Steinberg::Vst::ParamValue PLUGIN_API normalizedParamToPlain(
|
||||
Steinberg::Vst::ParamID id,
|
||||
Steinberg::Vst::ParamValue valueNormalized) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to
|
||||
* `IEditController::plainParamToNormalized(id, plain_value)` to the Wine
|
||||
* plugin host.
|
||||
*/
|
||||
struct PlainParamToNormalized {
|
||||
using Response = PrimitiveWrapper<Steinberg::Vst::ParamValue>;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
Steinberg::Vst::ParamID id;
|
||||
Steinberg::Vst::ParamValue plain_value;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.value4b(id);
|
||||
s.value8b(plain_value);
|
||||
}
|
||||
};
|
||||
|
||||
virtual Steinberg::Vst::ParamValue PLUGIN_API
|
||||
plainParamToNormalized(Steinberg::Vst::ParamID id,
|
||||
Steinberg::Vst::ParamValue plainValue) override = 0;
|
||||
|
||||
Reference in New Issue
Block a user