Rename YaEditController2 to YaEditController

Adding versions to our implementations doesn't work when the versions
and extensions start becoming non-numerical. This is what happened with
`IComponentHandler`.
This commit is contained in:
Robbert van der Helm
2020-12-19 13:48:21 +01:00
parent 1ede385784
commit 7e3568e333
9 changed files with 73 additions and 73 deletions
+12 -12
View File
@@ -297,7 +297,7 @@ bool Vst3Logger::log_request(bool is_host_vst,
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::SetComponentState& request) {
const YaEditController::SetComponentState& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::setComponentState(state = <IBStream* "
@@ -308,7 +308,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::GetParameterCount& request) {
const YaEditController::GetParameterCount& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::getParameterCount()";
@@ -317,7 +317,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::GetParameterInfo& request) {
const YaEditController::GetParameterInfo& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::getParameterInfo(paramIndex = "
@@ -327,7 +327,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::GetParamStringByValue& request) {
const YaEditController::GetParamStringByValue& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::getParamStringByValue(id = "
@@ -339,7 +339,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::GetParamValueByString& request) {
const YaEditController::GetParamValueByString& request) {
return log_request_base(is_host_vst, [&](auto& message) {
std::string param_title = VST3::StringConvert::convert(request.string);
message << request.instance_id
@@ -351,7 +351,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::NormalizedParamToPlain& request) {
const YaEditController::NormalizedParamToPlain& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::normalizedParamToPlain(id = "
@@ -362,7 +362,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::PlainParamToNormalized& request) {
const YaEditController::PlainParamToNormalized& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::plainParamToNormalized(id = "
@@ -373,7 +373,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::GetParamNormalized& request) {
const YaEditController::GetParamNormalized& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::getParamNormalized(id = " << request.id
@@ -383,7 +383,7 @@ bool Vst3Logger::log_request(
bool Vst3Logger::log_request(
bool is_host_vst,
const YaEditController2::SetParamNormalized& request) {
const YaEditController::SetParamNormalized& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::setParamNormalized(id = " << request.id
@@ -542,7 +542,7 @@ void Vst3Logger::log_response(
void Vst3Logger::log_response(
bool is_host_vst,
const YaEditController2::GetParameterInfoResponse& response) {
const YaEditController::GetParameterInfoResponse& response) {
log_response_base(is_host_vst, [&](auto& message) {
message << response.result.string();
if (response.result == Steinberg::kResultOk) {
@@ -555,7 +555,7 @@ void Vst3Logger::log_response(
void Vst3Logger::log_response(
bool is_host_vst,
const YaEditController2::GetParamStringByValueResponse& response) {
const YaEditController::GetParamStringByValueResponse& response) {
log_response_base(is_host_vst, [&](auto& message) {
message << response.result.string();
if (response.result == Steinberg::kResultOk) {
@@ -567,7 +567,7 @@ void Vst3Logger::log_response(
void Vst3Logger::log_response(
bool is_host_vst,
const YaEditController2::GetParamValueByStringResponse& response) {
const YaEditController::GetParamValueByStringResponse& response) {
log_response_base(is_host_vst, [&](auto& message) {
message << response.result.string();
if (response.result == Steinberg::kResultOk) {
+12 -12
View File
@@ -85,23 +85,23 @@ class Vst3Logger {
bool log_request(bool is_host_vst, const YaConnectionPoint::Connect&);
bool log_request(bool is_host_vst, const YaConnectionPoint::Disconnect&);
bool log_request(bool is_host_vst,
const YaEditController2::SetComponentState&);
const YaEditController::SetComponentState&);
bool log_request(bool is_host_vst,
const YaEditController2::GetParameterCount&);
const YaEditController::GetParameterCount&);
bool log_request(bool is_host_vst,
const YaEditController2::GetParameterInfo&);
const YaEditController::GetParameterInfo&);
bool log_request(bool is_host_vst,
const YaEditController2::GetParamStringByValue&);
const YaEditController::GetParamStringByValue&);
bool log_request(bool is_host_vst,
const YaEditController2::GetParamValueByString&);
const YaEditController::GetParamValueByString&);
bool log_request(bool is_host_vst,
const YaEditController2::NormalizedParamToPlain&);
const YaEditController::NormalizedParamToPlain&);
bool log_request(bool is_host_vst,
const YaEditController2::PlainParamToNormalized&);
const YaEditController::PlainParamToNormalized&);
bool log_request(bool is_host_vst,
const YaEditController2::GetParamNormalized&);
const YaEditController::GetParamNormalized&);
bool log_request(bool is_host_vst,
const YaEditController2::SetParamNormalized&);
const YaEditController::SetParamNormalized&);
bool log_request(bool is_host_vst, const YaPluginBase::Initialize&);
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
bool log_request(bool is_host_vst, const YaPluginFactory::Construct&);
@@ -122,11 +122,11 @@ class Vst3Logger {
void log_response(bool is_host_vst,
const YaComponent::GetRoutingInfoResponse&);
void log_response(bool is_host_vst,
const YaEditController2::GetParameterInfoResponse&);
const YaEditController::GetParameterInfoResponse&);
void log_response(bool is_host_vst,
const YaEditController2::GetParamStringByValueResponse&);
const YaEditController::GetParamStringByValueResponse&);
void log_response(bool is_host_vst,
const YaEditController2::GetParamValueByStringResponse&);
const YaEditController::GetParamValueByStringResponse&);
void log_response(bool is_host_vst, const YaPluginFactory::ConstructArgs&);
void log_response(bool is_host_vst, const Configuration&);
+9 -9
View File
@@ -77,15 +77,15 @@ using ControlRequest = std::variant<Vst3PluginProxy::Construct,
YaComponent::SetActive,
YaConnectionPoint::Connect,
YaConnectionPoint::Disconnect,
YaEditController2::SetComponentState,
YaEditController2::GetParameterCount,
YaEditController2::GetParameterInfo,
YaEditController2::GetParamStringByValue,
YaEditController2::GetParamValueByString,
YaEditController2::NormalizedParamToPlain,
YaEditController2::PlainParamToNormalized,
YaEditController2::GetParamNormalized,
YaEditController2::SetParamNormalized,
YaEditController::SetComponentState,
YaEditController::GetParameterCount,
YaEditController::GetParameterInfo,
YaEditController::GetParamStringByValue,
YaEditController::GetParamValueByString,
YaEditController::NormalizedParamToPlain,
YaEditController::PlainParamToNormalized,
YaEditController::GetParamNormalized,
YaEditController::SetParamNormalized,
YaPluginBase::Initialize,
YaPluginBase::Terminate,
YaPluginFactory::Construct,
@@ -32,7 +32,7 @@ Vst3PluginProxy::Vst3PluginProxy(const ConstructArgs&& args)
: YaAudioProcessor(std::move(args.audio_processor_args)),
YaComponent(std::move(args.component_args)),
YaConnectionPoint(std::move(args.connection_point_args)),
YaEditController2(std::move(args.edit_controller_2_args)),
YaEditController(std::move(args.edit_controller_2_args)),
YaPluginBase(std::move(args.plugin_base_args)),
arguments(std::move(args)){FUNKNOWN_CTOR}
@@ -77,11 +77,11 @@ tresult PLUGIN_API Vst3PluginProxy::queryInterface(Steinberg::FIDString _iid,
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IConnectionPoint::iid,
Steinberg::Vst::IConnectionPoint)
}
if (YaEditController2::supported_version_1()) {
if (YaEditController::supported_version_1()) {
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IEditController::iid,
Steinberg::Vst::IEditController)
}
if (YaEditController2::supported_version_2()) {
if (YaEditController::supported_version_2()) {
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IEditController2::iid,
Steinberg::Vst::IEditController2)
}
+2 -2
View File
@@ -57,7 +57,7 @@
class Vst3PluginProxy : public YaAudioProcessor,
public YaComponent,
public YaConnectionPoint,
public YaEditController2,
public YaEditController,
public YaPluginBase {
public:
/**
@@ -80,7 +80,7 @@ class Vst3PluginProxy : public YaAudioProcessor,
YaAudioProcessor::ConstructArgs audio_processor_args;
YaComponent::ConstructArgs component_args;
YaConnectionPoint::ConstructArgs connection_point_args;
YaEditController2::ConstructArgs edit_controller_2_args;
YaEditController::ConstructArgs edit_controller_2_args;
YaPluginBase::ConstructArgs plugin_base_args;
template <typename S>
@@ -16,14 +16,14 @@
#include "edit-controller.h"
YaEditController2::ConstructArgs::ConstructArgs() {}
YaEditController::ConstructArgs::ConstructArgs() {}
YaEditController2::ConstructArgs::ConstructArgs(
YaEditController::ConstructArgs::ConstructArgs(
Steinberg::IPtr<Steinberg::FUnknown> object)
: supported_version_1(
Steinberg::FUnknownPtr<Steinberg::Vst::IEditController>(object)),
supported_version_2(
Steinberg::FUnknownPtr<Steinberg::Vst::IEditController2>(object)) {}
YaEditController2::YaEditController2(const ConstructArgs&& args)
YaEditController::YaEditController(const ConstructArgs&& args)
: arguments(std::move(args)) {}
@@ -31,11 +31,11 @@
* Steinberg forgot to inherit `IEditController2` from `IEditController` event
* if it says it does in the docs, so we'll pretend they just that.
*/
class YaEditController2 : public Steinberg::Vst::IEditController,
public Steinberg::Vst::IEditController2 {
class YaEditController : public Steinberg::Vst::IEditController,
public Steinberg::Vst::IEditController2 {
public:
/**
* These are the arguments for creating a `YaEditController2`.
* These are the arguments for creating a `YaEditController`.
*/
struct ConstructArgs {
ConstructArgs();
@@ -67,7 +67,7 @@ class YaEditController2 : public Steinberg::Vst::IEditController,
* Instantiate this instance with arguments read from another interface
* implementation.
*/
YaEditController2(const ConstructArgs&& args);
YaEditController(const ConstructArgs&& args);
inline bool supported_version_1() const {
return arguments.supported_version_1;
+11 -11
View File
@@ -231,22 +231,22 @@ Vst3PluginProxyImpl::notify(Steinberg::Vst::IMessage* message) {
tresult PLUGIN_API
Vst3PluginProxyImpl::setComponentState(Steinberg::IBStream* state) {
return bridge.send_message(YaEditController2::SetComponentState{
return bridge.send_message(YaEditController::SetComponentState{
.instance_id = instance_id(), .state = state});
}
int32 PLUGIN_API Vst3PluginProxyImpl::getParameterCount() {
return bridge.send_message(
YaEditController2::GetParameterCount{.instance_id = instance_id()});
YaEditController::GetParameterCount{.instance_id = instance_id()});
}
tresult PLUGIN_API Vst3PluginProxyImpl::getParameterInfo(
int32 paramIndex,
Steinberg::Vst::ParameterInfo& info /*out*/) {
const GetParameterInfoResponse response = bridge.send_message(
YaEditController2::GetParameterInfo{.instance_id = instance_id(),
.param_index = paramIndex,
.info = info});
YaEditController::GetParameterInfo{.instance_id = instance_id(),
.param_index = paramIndex,
.info = info});
info = response.updated_info;
@@ -258,7 +258,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getParamStringByValue(
Steinberg::Vst::ParamValue valueNormalized /*in*/,
Steinberg::Vst::String128 string /*out*/) {
const GetParamStringByValueResponse response =
bridge.send_message(YaEditController2::GetParamStringByValue{
bridge.send_message(YaEditController::GetParamStringByValue{
.instance_id = instance_id(),
.id = id,
.value_normalized = valueNormalized});
@@ -274,7 +274,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getParamValueByString(
Steinberg::Vst::TChar* string /*in*/,
Steinberg::Vst::ParamValue& valueNormalized /*out*/) {
const GetParamValueByStringResponse response =
bridge.send_message(YaEditController2::GetParamValueByString{
bridge.send_message(YaEditController::GetParamValueByString{
.instance_id = instance_id(), .id = id, .string = string});
valueNormalized = response.value_normalized;
@@ -286,7 +286,7 @@ Steinberg::Vst::ParamValue PLUGIN_API
Vst3PluginProxyImpl::normalizedParamToPlain(
Steinberg::Vst::ParamID id,
Steinberg::Vst::ParamValue valueNormalized) {
return bridge.send_message(YaEditController2::NormalizedParamToPlain{
return bridge.send_message(YaEditController::NormalizedParamToPlain{
.instance_id = instance_id(),
.id = id,
.value_normalized = valueNormalized});
@@ -296,20 +296,20 @@ Steinberg::Vst::ParamValue PLUGIN_API
Vst3PluginProxyImpl::plainParamToNormalized(
Steinberg::Vst::ParamID id,
Steinberg::Vst::ParamValue plainValue) {
return bridge.send_message(YaEditController2::PlainParamToNormalized{
return bridge.send_message(YaEditController::PlainParamToNormalized{
.instance_id = instance_id(), .id = id, .plain_value = plainValue});
}
Steinberg::Vst::ParamValue PLUGIN_API
Vst3PluginProxyImpl::getParamNormalized(Steinberg::Vst::ParamID id) {
return bridge.send_message(YaEditController2::GetParamNormalized{
return bridge.send_message(YaEditController::GetParamNormalized{
.instance_id = instance_id(), .id = id});
}
tresult PLUGIN_API
Vst3PluginProxyImpl::setParamNormalized(Steinberg::Vst::ParamID id,
Steinberg::Vst::ParamValue value) {
return bridge.send_message(YaEditController2::SetParamNormalized{
return bridge.send_message(YaEditController::SetParamNormalized{
.instance_id = instance_id(), .id = id, .value = value});
}
+17 -17
View File
@@ -270,40 +270,40 @@ void Vst3Bridge::run() {
object_instances[request.other_instance_id]
.connection_point);
},
[&](YaEditController2::SetComponentState& request)
-> YaEditController2::SetComponentState::Response {
[&](YaEditController::SetComponentState& request)
-> YaEditController::SetComponentState::Response {
return object_instances[request.instance_id]
.edit_controller->setComponentState(&request.state);
},
[&](const YaEditController2::GetParameterCount& request)
-> YaEditController2::GetParameterCount::Response {
[&](const YaEditController::GetParameterCount& request)
-> YaEditController::GetParameterCount::Response {
return object_instances[request.instance_id]
.edit_controller->getParameterCount();
},
[&](YaEditController2::GetParameterInfo& request)
-> YaEditController2::GetParameterInfo::Response {
[&](YaEditController::GetParameterInfo& request)
-> YaEditController::GetParameterInfo::Response {
const tresult result =
object_instances[request.instance_id]
.edit_controller->getParameterInfo(request.param_index,
request.info);
return YaEditController2::GetParameterInfoResponse{
return YaEditController::GetParameterInfoResponse{
.result = result, .updated_info = request.info};
},
[&](const YaEditController2::GetParamStringByValue& request)
-> YaEditController2::GetParamStringByValue::Response {
[&](const YaEditController::GetParamStringByValue& request)
-> YaEditController::GetParamStringByValue::Response {
Steinberg::Vst::String128 string{0};
const tresult result =
object_instances[request.instance_id]
.edit_controller->getParamStringByValue(
request.id, request.value_normalized, string);
return YaEditController2::GetParamStringByValueResponse{
return YaEditController::GetParamStringByValueResponse{
.result = result,
.string = tchar_pointer_to_u16string(string)};
},
[&](const YaEditController2::GetParamValueByString& request)
-> YaEditController2::GetParamValueByString::Response {
[&](const YaEditController::GetParamValueByString& request)
-> YaEditController::GetParamValueByString::Response {
Steinberg::Vst::ParamValue value_normalized;
const tresult result =
object_instances[request.instance_id]
@@ -314,24 +314,24 @@ void Vst3Bridge::run() {
request.string.c_str())),
value_normalized);
return YaEditController2::GetParamValueByStringResponse{
return YaEditController::GetParamValueByStringResponse{
.result = result, .value_normalized = value_normalized};
},
[&](const YaEditController2::NormalizedParamToPlain& request) {
[&](const YaEditController::NormalizedParamToPlain& request) {
return object_instances[request.instance_id]
.edit_controller->normalizedParamToPlain(
request.id, request.value_normalized);
},
[&](const YaEditController2::PlainParamToNormalized& request) {
[&](const YaEditController::PlainParamToNormalized& request) {
return object_instances[request.instance_id]
.edit_controller->plainParamToNormalized(
request.id, request.plain_value);
},
[&](const YaEditController2::GetParamNormalized& request) {
[&](const YaEditController::GetParamNormalized& request) {
return object_instances[request.instance_id]
.edit_controller->getParamNormalized(request.id);
},
[&](const YaEditController2::SetParamNormalized& request) {
[&](const YaEditController::SetParamNormalized& request) {
return object_instances[request.instance_id]
.edit_controller->setParamNormalized(request.id,
request.value);