💥 Reimplement VST2 audio processing

We now use shared memory to store the input and output audio buffers.
This means that we have to copy less data every processing cycle, since
a single copy to and a single copy from the shared memory object
suffices now. This should reduce the DSP load for VST2
plugins (especially when used in a plugin group) marginally to
significantly depending on the plugins used and the system
configuration.
This commit is contained in:
Robbert van der Helm
2021-06-10 17:29:35 +02:00
parent 80fa010af5
commit 50c25c1cf0
8 changed files with 469 additions and 299 deletions
+7
View File
@@ -487,6 +487,13 @@ Vst2EventResult passthrough_event(AEffect* plugin,
// after the plugin has already finished initializing.
return nullptr;
},
[](const WantsAudioShmBufferConfig&) -> void* {
// This is another magic value. We'll create the shared memory
// object after the plugin's dispatch function has returned and then
// return the configuration to the native plugin, in
// `Vst2Bridge::run`.
return nullptr;
},
[&](const WantsChunkBuffer&) -> void* { return string_buffer.data(); },
[](VstIOProperties& props) -> void* { return &props; },
[](VstMidiKeyName& key_name) -> void* { return &key_name; },