Do you mean this snippet in InstrumentDemo.mm? Line 7?
| - (AUInternalRenderBlock)internalRenderBlock { |
| / |
| Capture in locals to avoid ObjC member lookups. If "self" is captured in |
| render, we're doing it wrong. |
| */ |
| __block InstrumentDSPKernel *state = &_kernel; |
| __block AUMIDIOutputEventBlock midiOut = self.MIDIOutputEventBlock; |
| |
| return ^AUAudioUnitStatus( |
| AudioUnitRenderActionFlags *actionFlags, |
| const AudioTimeStamp *timestamp, |
| AVAudioFrameCount frameCount, |
| NSInteger outputBusNumber, |
| AudioBufferList *outputData, |
| const AURenderEvent *realtimeEventListHead, |
| AURenderPullInputBlock pullInputBlock) { |
| |
| _outputBusBuffer.prepareOutputBufferList(outputData, frameCount, true); |
| state->setBuffers(outputData); |
| state->processWithEvents(timestamp, frameCount, realtimeEventListHead, midiOut); |
| |
| |
| return noErr; |
| }; |
| } |