Implement IComponent::getState()

With this the basic IComponent interface is fully implemented. Next will
be `IAudioProcessor` and `IConnectionPoint` as additions to IComponent.
We'll use the same `known_iids` mechanism as used in the plugin factory.
This commit is contained in:
Robbert van der Helm
2020-12-14 12:33:35 +01:00
parent 02e6fb1ba8
commit e653142e45
9 changed files with 75 additions and 8 deletions
+9
View File
@@ -158,6 +158,15 @@ void Vst3Bridge::run() {
return component_instances[request.instance_id]
.component->setState(&request.state);
},
[&](YaComponent::GetState& request)
-> YaComponent::GetState::Response {
VectorStream stream;
const tresult result = component_instances[request.instance_id]
.component->getState(&stream);
return YaComponent::GetStateResponse{
.result = result, .updated_state = std::move(stream)};
},
[&](const YaPluginFactory::Construct&)
-> YaPluginFactory::Construct::Response {
return YaPluginFactory::ConstructArgs(