mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-18 09:23:55 +02:00
Reuse VST2 audio processing buffers on plugin side
This commit is contained in:
@@ -153,6 +153,22 @@ class Vst2PluginBridge : PluginBridge<Vst2Sockets<std::jthread>> {
|
||||
*/
|
||||
Vst2Logger logger;
|
||||
|
||||
/**
|
||||
* The object we'll serialize the audio buffers and any auxiliary
|
||||
* information into when processing audio. We need to reuse this object to
|
||||
* avoid reallocations since it contains pointers to heap data.
|
||||
*/
|
||||
AudioBuffers process_input_buffers;
|
||||
|
||||
/**
|
||||
* The object we'll serialize the response into after the plugin has
|
||||
* finished processing audio. We cannot reuse `process_input_buffers`
|
||||
* because for instance a mono-to-stereo plugin would cause us to constantly
|
||||
* reallocate the sample buffer for the last channel. We need to reuse this
|
||||
* object to avoid reallocations since it contains pointers to heap data.
|
||||
*/
|
||||
AudioBuffers process_output_buffers;
|
||||
|
||||
/**
|
||||
* A scratch buffer for sending and receiving binary data during the
|
||||
* `process()`, `processReplacing()` and `processDoubleReplacing()` calls.
|
||||
|
||||
Reference in New Issue
Block a user