I have my application working well with realtime processing, but am having some issues with non realtime - which I refer to as offline processing, where buffers of audio are pulled through my plugin host faster than realtime while midi data is sent to the host timestamped relative to a starting sample as opposed to the system clock.
I have setNonRealtime(true) on my AudioProcessorGraph, and getCurrentProcessor()->suspendProcessing( true) on my AudioProcessorPlayer to stop the audio thread from making calls while I process offline by calling processBlock() on my AudioProcessorPlayer myself.
Looking at my realtime interaction with MidiMessageCollector, it seems this won’t just magically work as I had hoped.
MidiMessageCollector::addMessageToQueue() uses the system time to create sample based offsets relative to the previous call of MidiMessageCollector:removeNextBlockOfMessages(). And MidiMessageCollector:removeNextBlockOfMessages() pulls midi data out based on system time intervals.
How are people getting offline processing to work? I assume the offline midi stream is being sent elsewhere than a MidiMessageCollector, and is being sent to the plugins in the AudioProcessorGraph in a loop apart from what I currently have set up. Are there already mechanisms provided for this that I haven’t found yet?
Thanks again for your help.