Serious MIDI failure in iOS AUAudiounit: bug?

I have an audio unit in development that can use a considerable amount of CPU. However in normal use this amount never goes above the threshold where stuttering will occur on any device. ( even a 5s! ) . In fact it's rarely possibly to push it above 60%.


During testing it was noticed that Cubasis' Freeze rendering would completely fail with this unit. Further investigation showed that, during freeze rendering, Steinberg are calling the internalRenderBlock with the smallest possible buffer size and this in turn was causing the issue I'm about to try to explain...


This is most noticeable on lower powered devices: e.g: iPad Air 2 and earlier.


Apple Bug Reporter issue number: 36992569


If an AU consumes more than a certain threshold ( varies according to device and is way too low ) MIDI will stop arriving from the host via the realtimeEventListHead pointer parameter of internalRenderBlock. At this point the pointer will be null or contain no MIDI events if CPU consumption by the AU gets high. This threshold is much lower than one would expect, in fact I believe that MIDI should always arrive regardless of CPU consumption, especially during an offline process such as a freeze render by a host.


In normal circumstances and with a larger buffer size of 128 or bigger the AU I'm developing works without issue on all devices. However in my bug report I included a modified version of the Apple Instrument AU example to show this issue happens in any audio unit, not just the one I'm developing.


I've noticed that posting in this forum sometimes expedites bug attention ( @theanalogkid ? ) I'm hoping this might happen!


Of course with code as complex as this I always expect the issue to be in my own coding, however this time I'm pretty confident it's a bug in iOS.

Replies

[edit] further testing revealed it's not the buffer size that matters it appears entirely down to the amount of time spent rendering in the render block.


I've recently attached a test app to the bug report, it's basically the instrument from Apple's AudioUnitV3 Example, modified very slightly in order to overload the render block, MIDI events stop arriving at that a point way below the threshold at which the render block would start to stutter. I believe this pretty much confirms it's a bug in iOS and not my own engine as there is none of my own code in the test app I provided.

Be sure to add your br# to your thread for reference, thanks & g'luck.

I would VERY much like some kind of response to this issue as it's actually a very serious bug and Apple are seemingly ignoring it. MIDI should never stop arriving at the right time except in extreme circumstances and a process that completes all its DSP in less than the allocated time (60% to 80%) cannot be considered extreme.