mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Rename CLAP audio thread sockets
So they're specifically for host->plugin control messages. We'll need separate sockets for callbacks.
This commit is contained in:
@@ -38,8 +38,8 @@
|
|||||||
* of these connections are capable of spawning additional sockets and threads
|
* of these connections are capable of spawning additional sockets and threads
|
||||||
* as needed.
|
* as needed.
|
||||||
*
|
*
|
||||||
* Every plugin instance gets a dedicated audio thread socket so they can be
|
* Every plugin instance gets dedicated audio thread control and callback so
|
||||||
* addressed concurrently.
|
* they can be addressed concurrently.
|
||||||
*
|
*
|
||||||
* @tparam Thread The thread implementation to use. On the Linux side this
|
* @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`.
|
* 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.
|
* of these objects need to have an `instance_id` field.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename T::Response send_audio_thread_message(
|
typename T::Response send_audio_thread_control_message(
|
||||||
const T& object,
|
const T& object,
|
||||||
std::optional<std::pair<ClapLogger&, bool>> logging) {
|
std::optional<std::pair<ClapLogger&, bool>> logging) {
|
||||||
typename T::Response response_object;
|
typename T::Response response_object;
|
||||||
return receive_audio_thread_message_into(object, response_object,
|
return receive_audio_thread_control_message_into(
|
||||||
object.instance_id, logging);
|
object, response_object, object.instance_id, logging);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,11 +203,11 @@ class ClapSockets final : public Sockets {
|
|||||||
* directly get the instance ID there.
|
* directly get the instance ID there.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename T::Response send_audio_thread_message(
|
typename T::Response send_audio_thread_control_message(
|
||||||
const MessageReference<T>& object_ref,
|
const MessageReference<T>& object_ref,
|
||||||
std::optional<std::pair<ClapLogger&, bool>> logging) {
|
std::optional<std::pair<ClapLogger&, bool>> logging) {
|
||||||
typename T::Response response_object;
|
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);
|
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
|
* TODO: Think of a better name for this
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename T::Response& receive_audio_thread_message_into(
|
typename T::Response& receive_audio_thread_control_message_into(
|
||||||
const MessageReference<T>& request_ref,
|
const MessageReference<T>& request_ref,
|
||||||
typename T::Response& response_ref,
|
typename T::Response& response_ref,
|
||||||
std::optional<std::pair<ClapLogger&, bool>> logging) {
|
std::optional<std::pair<ClapLogger&, bool>> logging) {
|
||||||
return receive_audio_thread_message_into(
|
return receive_audio_thread_control_message_into(
|
||||||
request_ref, response_ref, request_ref.get().instance_id, logging);
|
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.
|
* static variable for our buffers sending.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename T::Response& receive_audio_thread_message_into(
|
typename T::Response& receive_audio_thread_control_message_into(
|
||||||
const T& object,
|
const T& object,
|
||||||
typename T::Response& response_object,
|
typename T::Response& response_object,
|
||||||
size_t instance_id,
|
size_t instance_id,
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class ClapPluginBridge : PluginBridge<ClapSockets<std::jthread>> {
|
|||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename T::Response send_audio_thread_message(const T& object) {
|
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<ClapLogger&, bool>(logger_, true));
|
object, std::pair<ClapLogger&, bool>(logger_, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user