Set the audioMasterGetTime flags

Apparently this is a thing, and Ardour is the only DAW that respects
them.
This commit is contained in:
Robbert van der Helm
2021-06-12 20:36:22 +02:00
parent 8a754b08cf
commit 736b223af8
2 changed files with 10 additions and 2 deletions
+7 -2
View File
@@ -619,9 +619,14 @@ void Vst2PluginBridge::do_process(T** inputs, T** outputs, int sample_frames) {
// To prevent unnecessary bridging overhead, we'll send the time information
// together with the buffers because basically every plugin needs this
// NOTE: Apparently the value parameter here is a bitfield controlling which
// for which transport information gets populated, and Ardour is the
// only DAW that uses this. Since those flags aren't part of the
// VeSTige headers, let's just set all of them!
const VstTimeInfo* returned_time_info =
reinterpret_cast<const VstTimeInfo*>(host_callback_function(
&plugin, audioMasterGetTime, 0, 0, nullptr, 0.0));
reinterpret_cast<const VstTimeInfo*>(
host_callback_function(&plugin, audioMasterGetTime, 0,
~static_cast<intptr_t>(0), nullptr, 0.0));
if (returned_time_info) {
request.current_time_info = *returned_time_info;
} else {