Allocate shared memory audio buffers for CLAP

This commit is contained in:
Robbert van der Helm
2022-09-15 18:39:59 +02:00
parent 7f07d5f29f
commit e26025f7c6
5 changed files with 141 additions and 160 deletions
@@ -184,6 +184,17 @@ class clap_plugin_proxy {
size_t instance_id_;
clap::plugin::Descriptor descriptor_;
/**
* A shared memory object to share audio buffers between the native plugin
* and the Wine plugin host. Copying audio is the most significant source of
* bridging overhead during audio processing, and this way we can reduce the
* amount of copies required to only once for the input audio, and one more
* copy when copying the results back to the host.
*
* This will be set up during `clap_plugin::activate()`.
*/
std::optional<AudioShmBuffer> process_buffers_;
/**
* The vtable for `clap_plugin`, requires that this object is never moved or
* copied. We'll use the host data pointer instead of placing this vtable at