Hey,
I’m building an audio app in iOS 9.3 using AudioProcessorGraph.
I set up the graph in in prepareToPlay(). However the block size given in prepareToplay is different to that given in getNextAudioBlock, screwing everything up. I tried using AudioProcessorPlayer to play the graph directly, but it also fails to deal with the block size change.
I have to manually check to see the block size has changed like so:
if(channelInfo.numSamples != processorGraph.getBlockSize()){
processorGraph.setPlayConfigDetails(0, 2, getSampleRate(), channelInfo.numSamples);
processorGraph.prepareToPlay(getSampleRate(), channelInfo.numSamples);
}
This makes it work…but it seems ugly. Shouldn’t AudioProcessorPlayer deal with buffer size changes automatically?
