mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
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:
@@ -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); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user