Implement IComponentHandler::beginEdit()

This commit is contained in:
Robbert van der Helm
2020-12-19 15:36:50 +01:00
parent eacd5f27f5
commit 3b06bca95e
8 changed files with 56 additions and 9 deletions
@@ -41,9 +41,8 @@ Vst3ComponentHandlerProxyImpl::queryInterface(const Steinberg::TUID _iid,
tresult PLUGIN_API
Vst3ComponentHandlerProxyImpl::beginEdit(Steinberg::Vst::ParamID id) {
// TODO: Implement
std::cerr << "TODO: IComponentHandler::beginEdit()" << std::endl;
return Steinberg::kNotImplemented;
return bridge.send_message(YaComponentHandler::BeginEdit{
.owner_instance_id = owner_instance_id(), .id = id});
}
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::performEdit(
+10
View File
@@ -103,6 +103,16 @@ class Vst3Bridge : public HostBridge {
*/
void run() override;
/**
* Send a callback message to the host return the response. This is a
* shorthand for `sockets.vst_host_callback.send_message` for use in VST3
* interface implementations.
*/
template <typename T>
typename T::Response send_message(const T& object) {
return sockets.vst_host_callback.send_message(object, std::nullopt);
}
private:
/**
* Generate a nique instance identifier using an atomic fetch-and-add. This