mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add universal way to shutdown sockets on Wine side
This commit is contained in:
@@ -102,6 +102,14 @@ class HostBridge {
|
||||
const boost::filesystem::path plugin_path;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Used as part of the watchdog that shuts down a plugin when the remote
|
||||
* native host process dies. This is used to prevent plugins from hanging
|
||||
* indefinitely on a `recv()`. This function should just call
|
||||
* `sockets.close()`.
|
||||
*/
|
||||
virtual void close_sockets() = 0;
|
||||
|
||||
/**
|
||||
* The IO context used for event handling so that all events and window
|
||||
* message handling can be performed from a single thread, even when hosting
|
||||
|
||||
@@ -425,6 +425,10 @@ void Vst2Bridge::handle_x11_events() {
|
||||
}
|
||||
}
|
||||
|
||||
void Vst2Bridge::close_sockets() {
|
||||
sockets.close();
|
||||
}
|
||||
|
||||
intptr_t Vst2Bridge::dispatch_wrapper(AEffect* plugin,
|
||||
int opcode,
|
||||
int index,
|
||||
|
||||
@@ -68,6 +68,10 @@ class Vst2Bridge : public HostBridge {
|
||||
|
||||
void handle_x11_events() override;
|
||||
|
||||
protected:
|
||||
void close_sockets() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Forward the host callback made by the plugin to the host and return the
|
||||
* results.
|
||||
|
||||
@@ -1133,6 +1133,10 @@ void Vst3Bridge::handle_x11_events() {
|
||||
}
|
||||
}
|
||||
|
||||
void Vst3Bridge::close_sockets() {
|
||||
sockets.close();
|
||||
}
|
||||
|
||||
void Vst3Bridge::register_context_menu(Vst3ContextMenuProxyImpl& context_menu) {
|
||||
std::lock_guard lock(object_instances[context_menu.owner_instance_id()]
|
||||
.registered_context_menus_mutex);
|
||||
|
||||
@@ -233,6 +233,10 @@ class Vst3Bridge : public HostBridge {
|
||||
|
||||
void handle_x11_events() override;
|
||||
|
||||
protected:
|
||||
void close_sockets() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user