I’m trying to run a method whenever the host is playing. I currently have my plugin connected to the master track in Garageband and wait for
isPlaying attribute to be true and it looks like it is only enabled when it hits the beginning of a track. For example, I have
DBG("ppq: " << cpi.timeInSeconds); run in the
In the screenshot below I press play and the DBG message doesn’t start until the 5 second mark
In this configuration, because the main track is enabled and there’s something playing from the beginning the DBG message shows up.
processBlock will not be called until the host sends audio/midi data? Is there any way for a plugin to detect when the the play button is pressed in the host application?
EDIT: Just wanted to add a note that
isPlaying returns true even as the playhead plays passed the end of where the Audio2 track ends (and stops when I click the Stop button in the host). In other words, isPlaying=false in the red seleciton, and true otherwise: