mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 21:50:11 +02:00
Use a thread for dispatch events
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#include <vestige/aeffect.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
/**
|
||||
* This handles the communication between the Linux native VST plugin and the
|
||||
* Wine VST host. The functions below should be used as callback functions in an
|
||||
@@ -45,13 +47,13 @@ class PluginBridge {
|
||||
*/
|
||||
PluginBridge(std::string plugin_dll_path, std::string socket_endpoint_path);
|
||||
|
||||
/**
|
||||
* Block the main thread until the plugin shuts down.
|
||||
*/
|
||||
void wait();
|
||||
|
||||
intptr_t host_callback(AEffect*, int32_t, int32_t, intptr_t, void*, float);
|
||||
|
||||
// TODO: Remove debug loop
|
||||
void dispatch_loop();
|
||||
|
||||
// TODO: Set up all callback handlers
|
||||
|
||||
private:
|
||||
/**
|
||||
* The shared library handle of the VST plugin. I sadly could not get
|
||||
@@ -82,4 +84,11 @@ class PluginBridge {
|
||||
* pass the Wine plugin's information to the host.
|
||||
*/
|
||||
boost::asio::local::stream_protocol::socket vst_host_aeffect;
|
||||
|
||||
/**
|
||||
* The thread that handles dispatch events from the host.
|
||||
*/
|
||||
std::thread dispatch_handler;
|
||||
|
||||
// TODO: Set up all other callback handlers
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user