From 206b52807527aaecfde98fb372c28de4149ff3a5 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 23 May 2021 16:26:54 +0200 Subject: [PATCH] Rename the VST2 audio processing scratch buffer Since we also have input and output audio buffers, plain 'buffer' is a bit too overloaded here. --- src/plugin/bridges/vst2.cpp | 4 ++-- src/plugin/bridges/vst2.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugin/bridges/vst2.cpp b/src/plugin/bridges/vst2.cpp index 49b29453..8a0eabe7 100644 --- a/src/plugin/bridges/vst2.cpp +++ b/src/plugin/bridges/vst2.cpp @@ -617,14 +617,14 @@ void Vst2PluginBridge::do_process(T** inputs, T** outputs, int sample_frames) { // After sending these buffers to the Wine plugin host, we'll receive the // results back in the same object so we can write back the outputs sockets.host_vst_process_replacing.send(process_input_buffers, - process_buffer); + process_scratch_buffer); // NOTE: We use a different object for this, because otherwise // mono-to-stereo plugins or any other configuration where the number // of input channels does not match the number of output channels // would still result in constant reallocations sockets.host_vst_process_replacing.receive_single( - process_output_buffers, process_buffer); + process_output_buffers, process_scratch_buffer); std::vector>& output_audio_buffers = std::get>>(process_output_buffers.buffers); diff --git a/src/plugin/bridges/vst2.h b/src/plugin/bridges/vst2.h index bcc71680..63d34974 100644 --- a/src/plugin/bridges/vst2.h +++ b/src/plugin/bridges/vst2.h @@ -174,7 +174,7 @@ class Vst2PluginBridge : PluginBridge> { * `process()`, `processReplacing()` and `processDoubleReplacing()` calls. * This buffer also needs to stay alive. */ - SerializationBuffer<0> process_buffer; + SerializationBuffer<0> process_scratch_buffer; /** * We'll periodically synchronize the Wine host's audio thread priority with