Logic Pro X call to prepare to play and release resources

Hi Juce folk!

I just realised that Logic Pro X seems to call prepareToPlay() only on startup and not when the user hits the play button. In juce_AU_auwrapper.mm only the functions Reset() and Initialize() call prepareToPlay(). I am not talking about AUv3, btw…

However initialize() only gets called on plug-in instantiation and Reset() only calls PrepareToPlay() if Cleanup() has been called, which only gets called on plug-in destruction. In the same way, release resources are aslo not called

Is that a known deficit of AU or am I missing something?



For clarifiaction:
The reason why I am asking is that I need a way to determine, if processBlock() is being called or not… apparently Logic Pro X just stops calling processBlock when in Stop mode.

Yes, i have the same problem. I use lock-free fifos (queues) which are consumed in the audio-callback, which isn’t cool if the audio-callback isn’t called anymore.

I solved this with a separate whatchdog-thread which checks if the processBlock() has been called for some period of time, and consumes the queue instead.

1 Like

Thanks! That seems like a reasonable workaround… I reckon there is no other way anyway…