Quote:
Originally Posted by TBProAudio
In summary: if user touches a parameter (e.g. kdelay) which changes plugin delay you need to recalculate (and in function "ProcessDoubleReplacing" report) plugin latency.
|
Old thread, but for the record:
If it's a delay, you don't want to report latency (latency is zero), because you don't want compensation.
If there is delay introduced by the plugin that varies depending on plug-in settings that you do want to compensate for, it's far better to have a variable delay in the plugin that keeps the plug-in latency constant. Then there will be no guessing about how different hosts will handle latency changes under different conditions, and other quirks.
For instance, if the new SetLatency sets a new high for that track, the host will need to adjust the latency for all other tracks. Imagine turning up kDelay so it sends a stream of SetLatency at progressively higher values.
Besides, arbitrary callbacks to the host aren't a good idea. What if the host adjusts track compensation delays before returning? You're at the mercy of host behavior.