mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Implement start_processing, stop_processing, reset
This commit is contained in:
@@ -108,8 +108,8 @@ clap_plugin_proxy::plugin_start_processing(const struct clap_plugin* plugin) {
|
||||
assert(plugin && plugin->plugin_data);
|
||||
auto self = static_cast<const clap_plugin_proxy*>(plugin->plugin_data);
|
||||
|
||||
// TODO: Implement
|
||||
return false;
|
||||
return self->bridge_.send_audio_thread_message(
|
||||
clap::plugin::StartProcessing{.instance_id = self->instance_id()});
|
||||
}
|
||||
|
||||
void CLAP_ABI
|
||||
@@ -117,7 +117,8 @@ clap_plugin_proxy::plugin_stop_processing(const struct clap_plugin* plugin) {
|
||||
assert(plugin && plugin->plugin_data);
|
||||
auto self = static_cast<const clap_plugin_proxy*>(plugin->plugin_data);
|
||||
|
||||
// TODO: Implement
|
||||
self->bridge_.send_audio_thread_message(
|
||||
clap::plugin::StopProcessing{.instance_id = self->instance_id()});
|
||||
}
|
||||
|
||||
void CLAP_ABI
|
||||
@@ -125,7 +126,8 @@ clap_plugin_proxy::plugin_reset(const struct clap_plugin* plugin) {
|
||||
assert(plugin && plugin->plugin_data);
|
||||
auto self = static_cast<const clap_plugin_proxy*>(plugin->plugin_data);
|
||||
|
||||
// TODO: Implement
|
||||
self->bridge_.send_audio_thread_message(
|
||||
clap::plugin::Reset{.instance_id = self->instance_id()});
|
||||
}
|
||||
|
||||
clap_process_status CLAP_ABI
|
||||
|
||||
@@ -115,17 +115,15 @@ class ClapPluginBridge : PluginBridge<ClapSockets<std::jthread>> {
|
||||
object, std::pair<ClapLogger&, bool>(logger_, true));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Send an a message to a plugin instance's audio thread. This is
|
||||
// separate
|
||||
// * from `send_message()`, which shares one socket for all plugin
|
||||
// instances.
|
||||
// */
|
||||
// template <typename T>
|
||||
// typename T::Response send_audio_thread_message(const T& object) {
|
||||
// return sockets_.send_audio_processor_message(
|
||||
// object, std::pair<ClapLogger&, bool>(logger_, true));
|
||||
// }
|
||||
/**
|
||||
* Send an a message to a plugin instance's audio thread. This is separate
|
||||
* from `send_message()`, which shares one socket for all plugin instances.
|
||||
*/
|
||||
template <typename T>
|
||||
typename T::Response send_audio_thread_message(const T& object) {
|
||||
return sockets_.send_audio_thread_message(
|
||||
object, std::pair<ClapLogger&, bool>(logger_, true));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Send an audio thread control message to a specific plugin instance,
|
||||
|
||||
Reference in New Issue
Block a user