Fully implement IAutomationState

This commit is contained in:
Robbert van der Helm
2021-01-10 23:38:40 +01:00
parent 609360537c
commit a2d1a97309
4 changed files with 10 additions and 4 deletions
+1
View File
@@ -71,6 +71,7 @@ using ControlRequest =
Vst3PluginProxy::SetState,
Vst3PluginProxy::GetState,
YaAudioPresentationLatency::SetAudioPresentationLatencySamples,
YaAutomationState::SetAutomationState,
YaConnectionPoint::Connect,
YaConnectionPoint::Disconnect,
YaConnectionPoint::Notify,
@@ -157,10 +157,8 @@ uint32 PLUGIN_API Vst3PluginProxyImpl::getTailSamples() {
}
tresult PLUGIN_API Vst3PluginProxyImpl::setAutomationState(int32 state) {
// TODO: Implement
bridge.logger.log(
"TODO: Implyement IAutomationState::setAutomationState()");
return Steinberg::kNotImplemented;
return bridge.send_message(YaAutomationState::SetAutomationState{
.instance_id = instance_id(), .state = state});
}
tresult PLUGIN_API
+6
View File
@@ -39,6 +39,7 @@ InstanceInterfaces::InstanceInterfaces(
: object(object),
audio_presentation_latency(object),
audio_processor(object),
automation_state(object),
component(object),
connection_point(object),
edit_controller(object),
@@ -197,6 +198,11 @@ void Vst3Bridge::run() {
request.dir, request.bus_index,
request.latency_in_samples);
},
[&](YaAutomationState::SetAutomationState& request)
-> YaAutomationState::SetAutomationState::Response {
return object_instances[request.instance_id]
.automation_state->setAutomationState(request.state);
},
[&](YaConnectionPoint::Connect& request)
-> YaConnectionPoint::Connect::Response {
// If the host directly connected the underlying objects then we
+1
View File
@@ -148,6 +148,7 @@ struct InstanceInterfaces {
Steinberg::FUnknownPtr<Steinberg::Vst::IAudioPresentationLatency>
audio_presentation_latency;
Steinberg::FUnknownPtr<Steinberg::Vst::IAudioProcessor> audio_processor;
Steinberg::FUnknownPtr<Steinberg::Vst::IAutomationState> automation_state;
Steinberg::FUnknownPtr<Steinberg::Vst::IComponent> component;
Steinberg::FUnknownPtr<Steinberg::Vst::IConnectionPoint> connection_point;
Steinberg::FUnknownPtr<Steinberg::Vst::IEditController> edit_controller;