mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Fully implement IParameterFunctionName
We now support all VST 3.7.1 interfaces! At least, in theory we do.
This commit is contained in:
@@ -103,6 +103,7 @@ using ControlRequest =
|
||||
YaNoteExpressionController::GetNoteExpressionValueByString,
|
||||
YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMapping,
|
||||
YaParameterFinder::FindParameter,
|
||||
YaParameterFunctionName::GetParameterIDFromFunctionName,
|
||||
YaPlugView::IsPlatformTypeSupported,
|
||||
YaPlugView::Attached,
|
||||
YaPlugView::Removed,
|
||||
|
||||
@@ -692,11 +692,23 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getParameterIDFromFunctionName(
|
||||
Steinberg::Vst::UnitID unitID,
|
||||
Steinberg::FIDString functionName,
|
||||
Steinberg::Vst::ParamID& paramID) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log(
|
||||
"TODO: Implement "
|
||||
"IParameterFunctionName::getParameterIDFromFunctionName()");
|
||||
return Steinberg::kNotImplemented;
|
||||
if (functionName) {
|
||||
const GetParameterIDFromFunctionNameResponse response =
|
||||
bridge.send_message(
|
||||
YaParameterFunctionName::GetParameterIDFromFunctionName{
|
||||
.instance_id = instance_id(),
|
||||
.unit_id = unitID,
|
||||
.function_name = functionName});
|
||||
|
||||
paramID = response.param_id;
|
||||
|
||||
return response.result;
|
||||
} else {
|
||||
bridge.logger.log(
|
||||
"WARNING: Null pointer passed to "
|
||||
"'IParameterFunctionName::getParameterIDFromFunctionName()'");
|
||||
return Steinberg::kInvalidArgument;
|
||||
}
|
||||
}
|
||||
|
||||
tresult PLUGIN_API Vst3PluginProxyImpl::initialize(FUnknown* context) {
|
||||
|
||||
@@ -55,6 +55,7 @@ InstanceInterfaces::InstanceInterfaces(
|
||||
note_expression_physical_ui_mapping(object),
|
||||
plugin_base(object),
|
||||
unit_data(object),
|
||||
parameter_function_name(object),
|
||||
prefetchable_support(object),
|
||||
process_context_requirements(object),
|
||||
program_list_data(object),
|
||||
@@ -573,6 +574,23 @@ void Vst3Bridge::run() {
|
||||
return YaParameterFinder::FindParameterResponse{
|
||||
.result = result, .result_tag = result_tag};
|
||||
},
|
||||
[&](const YaParameterFunctionName::GetParameterIDFromFunctionName&
|
||||
request) -> YaParameterFunctionName::
|
||||
GetParameterIDFromFunctionName::Response {
|
||||
Steinberg::Vst::ParamID param_id;
|
||||
const tresult result =
|
||||
object_instances[request.instance_id]
|
||||
.parameter_function_name
|
||||
->getParameterIDFromFunctionName(
|
||||
request.unit_id,
|
||||
request.function_name.c_str(),
|
||||
param_id);
|
||||
|
||||
return YaParameterFunctionName::
|
||||
GetParameterIDFromFunctionNameResponse{
|
||||
.result = result,
|
||||
.param_id = param_id};
|
||||
},
|
||||
[&](const YaPlugView::IsPlatformTypeSupported& request)
|
||||
-> YaPlugView::IsPlatformTypeSupported::Response {
|
||||
// The host will of course want to pass an X11 window ID for the
|
||||
|
||||
@@ -169,6 +169,8 @@ struct InstanceInterfaces {
|
||||
note_expression_physical_ui_mapping;
|
||||
Steinberg::FUnknownPtr<Steinberg::IPluginBase> plugin_base;
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitData> unit_data;
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IParameterFunctionName>
|
||||
parameter_function_name;
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IPrefetchableSupport>
|
||||
prefetchable_support;
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IProcessContextRequirements>
|
||||
|
||||
Reference in New Issue
Block a user