From da3386494f3d0d8139f3ddbdc7a02fc8e83da87c Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 25 Sep 2022 16:17:36 +0200 Subject: [PATCH] Rename CLAP audio thread sockets So they're specifically for host->plugin control messages. We'll need separate sockets for callbacks. --- src/common/communication/clap.h | 20 ++++++++++---------- src/plugin/bridges/clap.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/common/communication/clap.h b/src/common/communication/clap.h index 20cdc891..17e09830 100644 --- a/src/common/communication/clap.h +++ b/src/common/communication/clap.h @@ -38,8 +38,8 @@ * of these connections are capable of spawning additional sockets and threads * as needed. * - * Every plugin instance gets a dedicated audio thread socket so they can be - * addressed concurrently. + * Every plugin instance gets dedicated audio thread control and callback so + * they can be addressed concurrently. * * @tparam Thread The thread implementation to use. On the Linux side this * should be `std::jthread` and on the Wine side this should be `Win32Thread`. @@ -190,12 +190,12 @@ class ClapSockets final : public Sockets { * of these objects need to have an `instance_id` field. */ template - typename T::Response send_audio_thread_message( + typename T::Response send_audio_thread_control_message( const T& object, std::optional> logging) { typename T::Response response_object; - return receive_audio_thread_message_into(object, response_object, - object.instance_id, logging); + return receive_audio_thread_control_message_into( + object, response_object, object.instance_id, logging); } /** @@ -203,11 +203,11 @@ class ClapSockets final : public Sockets { * directly get the instance ID there. */ template - typename T::Response send_audio_thread_message( + typename T::Response send_audio_thread_control_message( const MessageReference& object_ref, std::optional> logging) { typename T::Response response_object; - return receive_audio_thread_message_into( + return receive_audio_thread_control_message_into( object_ref, response_object, object_ref.get().instance_id, logging); } @@ -219,11 +219,11 @@ class ClapSockets final : public Sockets { * TODO: Think of a better name for this */ template - typename T::Response& receive_audio_thread_message_into( + typename T::Response& receive_audio_thread_control_message_into( const MessageReference& request_ref, typename T::Response& response_ref, std::optional> logging) { - return receive_audio_thread_message_into( + return receive_audio_thread_control_message_into( request_ref, response_ref, request_ref.get().instance_id, logging); } @@ -253,7 +253,7 @@ class ClapSockets final : public Sockets { * static variable for our buffers sending. */ template - typename T::Response& receive_audio_thread_message_into( + typename T::Response& receive_audio_thread_control_message_into( const T& object, typename T::Response& response_object, size_t instance_id, diff --git a/src/plugin/bridges/clap.h b/src/plugin/bridges/clap.h index 0e4fc885..27f5867b 100644 --- a/src/plugin/bridges/clap.h +++ b/src/plugin/bridges/clap.h @@ -121,7 +121,7 @@ class ClapPluginBridge : PluginBridge> { */ template typename T::Response send_audio_thread_message(const T& object) { - return sockets_.send_audio_thread_message( + return sockets_.send_audio_thread_control_message( object, std::pair(logger_, true)); }