mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 04:50:14 +02:00
Also sync VST3 audio thread scheduling priorities
The exact same thing as the last commit, but for VST3 plugins.
This commit is contained in:
@@ -250,10 +250,22 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor {
|
||||
|
||||
YaProcessData data;
|
||||
|
||||
/**
|
||||
* We'll periodically synchronize the realtime priority setting of the
|
||||
* host's audio thread with the Wine plugin host. We'll do this
|
||||
* approximately every ten seconds, as doing this getting and setting
|
||||
* scheduler information has a non trivial amount of overhead (even if
|
||||
* it's only a single microsoecond).
|
||||
*/
|
||||
std::optional<int> new_realtime_priority;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.object(data);
|
||||
|
||||
s.ext(new_realtime_priority, bitsery::ext::StdOptional{},
|
||||
[](S& s, int& priority) { s.value4b(priority); });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
#endif
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
/**
|
||||
* The interval in seconds between synchronizing the Wine plugin host's audio
|
||||
* thread scheduling priority with the host's audio thread.
|
||||
*
|
||||
* @relates Vst2Bridge::last_audio_thread_priority_synchronization
|
||||
*/
|
||||
constexpr time_t audio_thread_priority_synchronization_interval = 10;
|
||||
|
||||
// The cannonical overloading template for `std::visitor`, not sure why this
|
||||
// isn't part of the standard library
|
||||
template <class... Ts>
|
||||
|
||||
Reference in New Issue
Block a user