I’m having some trouble getting the latency compensation right for a custom plugin I’ve made inheriting from
tracktion::engine::Plugin. My plugin is doing some resampling, which introduces some latency (~5 samples) and I’m reporting this to the engine by overriding the
It seems though, that it only works when the plugin is enabled.
I’m testing the latency out by playing back the same audio clip on two tracks - one with the plugin and one without to see if they’re in sync.
When the plugin is bypassed, one track will be slightly later than the other resulting in something like a low-pass.
If enabled, it sounds the same as when I remove the plugin. I have dry/wet parameters and the plugin is just playing back the dry input delayed by the same amount reported by
Furthermore, when I do the same with the built in
PitchShiftPlugin (using SoundTouch), I get the same behaviour. When plugin is bypassed the track without the plugin is very audibly delayed. (Latency is 8192 samples).
When bypassed, shouldn’t the engine ensure that the plugin is still delayed by
I’m using the latest commit on develop. For now, I’ve only tested on Windows - not sure if that makes a difference.