Send the VST2 transport info along with processing

And cache it during the processing cycle. This greatly reduces the
overhead of bridging VST2 plugins.
This commit is contained in:
Robbert van der Helm
2021-04-29 00:32:25 +02:00
parent 6a3c726acf
commit 1deb4cf664
5 changed files with 95 additions and 55 deletions
+8
View File
@@ -555,6 +555,13 @@ struct AudioBuffers {
*/
int sample_frames;
/**
* We'll send the current transport information as part of an audio
* processing call. This lets us a void an unnecessary callback (or in some
* cases, more than one) during every processing cycle.
*/
std::optional<VstTimeInfo> current_time_info;
/**
* We'll periodically synchronize the realtime priority setting of the
* host's audio thread with the Wine plugin host. We'll do this
@@ -582,6 +589,7 @@ struct AudioBuffers {
});
s.value4b(sample_frames);
s.ext(current_time_info, bitsery::ext::StdOptional{});
s.ext(new_realtime_priority, bitsery::ext::StdOptional{},
[](S& s, int& priority) { s.value4b(priority); });
}