mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 20:40:03 +02:00
Add CLAP audio thread callback sockets
The initialization here is a bit funky and happens in lockstep to ensure both sides are synchronized.
This commit is contained in:
@@ -605,7 +605,8 @@ void ClapBridge::register_plugin_instance(
|
||||
object_instances_.emplace(
|
||||
instance_id, ClapPluginInstance(plugin, std::move(host_proxy)));
|
||||
|
||||
// Every plugin instance gets its own audio thread
|
||||
// Every plugin instance gets its own audio thread along with sockets for
|
||||
// host->plugin control messages and plugin->host callbacks
|
||||
std::promise<void> socket_listening_latch;
|
||||
object_instances_.at(instance_id).audio_thread_handler =
|
||||
Win32Thread([&, instance_id]() {
|
||||
@@ -619,7 +620,7 @@ void ClapBridge::register_plugin_instance(
|
||||
"audio-" + std::to_string(instance_id);
|
||||
pthread_setname_np(pthread_self(), thread_name.c_str());
|
||||
|
||||
sockets_.add_audio_thread_and_listen(
|
||||
sockets_.add_audio_thread_and_listen_control(
|
||||
instance_id, socket_listening_latch,
|
||||
overload{
|
||||
[&](const clap::plugin::StartProcessing& request)
|
||||
|
||||
Reference in New Issue
Block a user