Implement IEditController::normalizedValueToPlain

This commit is contained in:
Robbert van der Helm
2020-12-18 21:29:02 +01:00
parent a4e2a18480
commit 78d5e3bbfb
6 changed files with 51 additions and 9 deletions
+11
View File
@@ -333,6 +333,17 @@ void Vst3Logger::log_request(
});
}
void Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::NormalizedParamToPlain& request) {
log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::normalizedParamToPlain(id = "
<< request.id
<< ", valueNormalized = " << request.value_normalized << ")";
});
}
void Vst3Logger::log_request(bool is_host_vst,
const YaPluginBase::Initialize& request) {
log_request_base(is_host_vst, [&](auto& message) {
+2
View File
@@ -90,6 +90,8 @@ class Vst3Logger {
const YaEditController2::GetParamStringByValue&);
void log_request(bool is_host_vst,
const YaEditController2::GetParamValueByString&);
void log_request(bool is_host_vst,
const YaEditController2::NormalizedParamToPlain&);
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&);
+1
View File
@@ -81,6 +81,7 @@ using ControlRequest = std::variant<Vst3PluginProxy::Construct,
YaEditController2::GetParameterInfo,
YaEditController2::GetParamStringByValue,
YaEditController2::GetParamValueByString,
YaEditController2::NormalizedParamToPlain,
YaPluginBase::Initialize,
YaPluginBase::Terminate,
YaPluginFactory::Construct,
@@ -250,6 +250,28 @@ class YaEditController2 : public Steinberg::Vst::IEditController,
Steinberg::Vst::ParamID id,
Steinberg::Vst::TChar* string /*in*/,
Steinberg::Vst::ParamValue& valueNormalized /*out*/) override = 0;
/**
* Message to pass through a call to
* `IEditController::normalizedParamToPlain(id, value_normalized)` to the
* Wine plugin host.
*/
struct NormalizedParamToPlain {
using Response = PrimitiveWrapper<Steinberg::Vst::ParamValue>;
native_size_t instance_id;
Steinberg::Vst::ParamID id;
Steinberg::Vst::ParamValue value_normalized;
template <typename S>
void serialize(S& s) {
s.value8b(instance_id);
s.value4b(id);
s.value8b(value_normalized);
}
};
virtual Steinberg::Vst::ParamValue PLUGIN_API normalizedParamToPlain(
Steinberg::Vst::ParamID id,
Steinberg::Vst::ParamValue valueNormalized) override = 0;