How to detect DAW pause playing track from plugin

I just want to detect if DAW pause/stop playing track or not from plugin.
Is there a way to detect the status ?
Please help me.


If the host supports this, you find it in AudioPlayhead::CurrentPositionInfo.
It is only available in processBlock, like this:

AudioPlayHead::CurrentPositionInfo info;
getAudioPlayHead().getCurrentPosition (info);
if (info.isPlaying)

Hope that helps

Just to chime on what @daniel wrote,
As this is available only within processBlock you should save your last known struct. Also, when stopped your AudioProcessor::processBlock on many hosts would stop getting called.

For visual feedback you should set some timer on your Editor to check last state. Also, for empty tracks you might won’t even get called. Logic X would stop calling you on silent areas so you won’t know if you’re stopped.


Thanks u, your idea is similar with mine. I did it.