How to measure latency generated by one (or several) plugins

is there any reasonable way to make my plugin be able to recognize latency caused by other plugins (which are before my plugin) and measure size of that latency?

This is in the responsibility of the host. It can query each plugin with AudioProcessor::getLatencySamples().
a) nobody knows if every plugin sets this value correctly and
b) your plugin has no access to that data, since it would require too much knowledge about the project setup…

And is it only that way?
Don’t you know anything easier? :slight_smile:
In my case it could be manage by two plugins. I mean situation like that:
I have other plugin coded by myself on the beginning of path (let’s call it myFirstPlugin), then other third parties plugins, and at the and myLastPlugin. Is there any way to make communicate myFirstPlugin with myLastPlugin, and let them measure latency between them?

Maybe you might be able to make some kind of a system where your first plugin in the chain generates some kind of a “ping” audio signal that your last plugin in the FX chain could recognize and attempt to measure how much it was delayed(*), but I would predict that would not work ideally. What are you even actually trying to do?

(*) It’s obviously tricky to determine what time you would measure against…

I assume the question is related to your Linear Phase EQ thread over here?

If you want to measure the impulse response of an EQ to build up something like Waves Q-Clone for EQ plugins (not sure what you exactly plan…) I think the easiest solution from an end-users standpoint would be to make your plugin able to host a the EQ plugin you measure so that your plugin is the “host” and has access to all those information you don’t get from the host otherwise. But as I said I’m not completely sure if I really understood your idea :wink:

Yes you are right, but I tried to avoid building my own host. I believe it’s a lot of work :slight_smile: