I just implemented an offline renderer using an AudioProcessorGraph reading from 50+ AudioReaderSources…
Thanks to @jules post I could fix the buffer underruns, that inherently happen when calling getNextAudioBuffer as fast as I can
So yes, this solved the problem, thanks.
However, why I still want to use BufferingAudioSource is, the renderer runs now only on one CPU while the rest is idle…
I understand the reasons not to use a blocking getNextAudioBlock. But would it be possible to add a
bool waitForNextAudioBuffer (const AudioSourceChannelInfo &, const int sleepusecs, const int timeout); ?
It would simply check if buffer is valid, and if not do a sleep so the other buffering timeslices can work.
I know that calling this in realtime is off limits, because it needs to synchronize the reading of the buffer internals…
But it would enable to do offline rendering on more than one cpu…