mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 13:40:05 +02:00
Drop IPlugView pointer when host drops proxy
This commit is contained in:
@@ -59,7 +59,8 @@ struct WantsConfiguration {
|
||||
* encodes the information we request or the operation we want to perform. A
|
||||
* request of type `ControlRequest(T)` should send back a `T::Response`.
|
||||
*/
|
||||
using ControlRequest = std::variant<Vst3PluginProxy::Construct,
|
||||
using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
Vst3PluginProxy::Construct,
|
||||
Vst3PluginProxy::Destruct,
|
||||
Vst3PluginProxy::SetState,
|
||||
Vst3PluginProxy::GetState,
|
||||
|
||||
@@ -72,6 +72,22 @@ class Vst3PlugViewProxy : public YaPlugView {
|
||||
*/
|
||||
Vst3PlugViewProxy(const ConstructArgs&& args);
|
||||
|
||||
/**
|
||||
* Message to request the Wine plugin host to destroy the `IPlugView*`
|
||||
* returned by the object with the given instance ID. Sent from the
|
||||
* destructor of `Vst3PlugViewProxyImpl`.
|
||||
*/
|
||||
struct Destruct {
|
||||
using Response = Ack;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @remark The plugin side implementation should send a control message to
|
||||
* clean up the instance on the Wine side in its destructor.
|
||||
|
||||
Reference in New Issue
Block a user