Just curious if this is possible/reliable among the hosts, if anyone has tried it, potential pitfalls, etc.
One possible pitfall is that the host doesn’t correctly inform your plugin it is offline rendering.
I do it in a plugin of mine that uses a background thread for calculating the audio. During the host’s offline render, I wait for the background thread (and thus block the host’s render thread) until enough audio from the background thread is ready. (It’s nasty, I should just turn off using the background thread during offline renders but argh…It’s a mess…)
Which hosts cause problems? That kind of sounds like a bug in the host
I don’t know. I don’t have every host in the world to test with. My current scheme works at least in Reaper and Ableton Live. But it’s entirely possible there is some host that doesn’t for example set the plugin’s offline rendering state correctly. Or maybe there’s a host that keeps the offline state on even while doing real time playback…
Why exactly do you need to block during the host’s offline render?
Final Cut for example is know to not sending isNonRealTime():
There was something about audacity and Studio One mentioned in the thread, but I don’t know what the last status is.
Anything using asynchronous stuff (e.g. my plugin uses BufferingAudioSources to stream) will need to block.