thrashFunction / thrashFunctionCore2 : 46.7% : these fill up otherwise spare cycles to make sure total is 100% and to make overall measurement accurate
synthEngine / synthEngine : 35.4% : These are the two audio render threads that do oscillator/filter/downsample/stereodelay, 32 samples at a time. The stereoDelay is about 10% of that, the time is dominated by the 'step32at88k' function which incorporates the oversampled oscillators and the filter.
synthesizeAudioPacket : 3% which dispatches work out to the render threads, gathers the results, splits them into 'clean' and 'reverb send' signals, passes them through the reverb then accumulates them
Not shown is the less than 1% of Core Audio callback management
Not a 'sleep' in sight, previously the device would typically spend 3% of its time in usleep, and would still be in danger of not making callbacks in time, resulting in occasional pops. That's now settled.
And today's debugging horror show was a propogating NaN that only appeared when the app was launched by a touch rather than by 'Run' in Xcode. Meaning I couldn't see printfs and couldn't run the debugger to work out what the hell was happening. Evil, and yet typical. It turned out to be an oscillator - the sub-bass oscillator in fact - being initialized erroneously with a frequency of zero, then being reciprocated to generate an infinite period ... NaN! Fixed.
UPDATE - ran it in 'no oversampling mode', backed off on filters wherever possible, just one synth render thread to simulate a Pi - 24% of iPad 2. This might work. Here's what it sounded like -
UPDATE UPDATE - it transpires that, the way the code was written, it was trivial - like 20 lines of code scattered around the application - to turn oversampled mode on or off, per synth. Which is actually very cool and flexible - synths that don't need a filter typically don't need oversampling either (although oversampling can make hardsync and ring modulation less alias-prone), so for a multi-synth arrangement with a bunch of digital synths and a couple of 'Moogy' synths, enabling oversampling for just the Moogy synths will deliver excellent overall results for a small increase in overall compute burden. Brilliant.