Avoid allocations when reading VST3 process data

On the plugin side. We still need to do a lot of optimizations
elsewhere.
This commit is contained in:
Robbert van der Helm
2021-05-06 17:50:41 +02:00
parent 0b173ecba8
commit 9f5066a293
9 changed files with 168 additions and 85 deletions
@@ -186,10 +186,8 @@ Vst3PluginProxyImpl::process(Steinberg::Vst::ProcessData& data) {
last_audio_thread_priority_synchronization = now;
}
// TODO: Document
// TODO: Actually repopulate `process_data` with new data, right now this
// assignment just destroys the old object and creates a new object.
process_data = data;
// We reuse this existing object to avoid allocations
process_data.repopulate(data);
ProcessResponse response =
bridge.send_audio_processor_message(YaAudioProcessor::Process{