Latency changes

I’ve need for changing the latency of the plugin (upon user changing the settings). However, I’ve only seen latency as a hardcoded setting in the plugin characteristics header. I think that VST has provision to notify the host of changed latency (AU and RTAS might have this, don’t know). Is this something you’d consider to add to the framework, jules?

Oops, a little look shows informHostOfStateChange. I guess that I can change the latency reported back, and then call informHostOfStateChange. Correct?

Yes, that’s the thing to use. Not sure if all the hosts will actually notice the change though…

Although looking again, I saw that setInitialDelay is called with the statically defined latency (in the wrapper code), and I have no possibility to change it via the AudioFilterBase class…

Ah yes, I’m re-examining all that stuff at the moment, so that’ll probably turn into a dynamic value shortly…

Would be nice, because the number of samples of latency is ofcourse dependant on the samplerate, so if the host changes the samplerate it would nice if one could tell it that the amount of latency, expressed in samples, has changed. I´m not sure if VST allows that?