If you mean uses iOS device as MIDI Synthesizer (sound output from iOS device),
You needs AUGraph
& AudioUnit
(Look up in Xcode Help search for "Sampler Unit Presets (LoadPresetDemo)")
After you understand that some tips from me:
- define your custom structure that contains
AUGraph
&AudioUnit
. - pass your custom structure pointer as
refCon
inMIDIInputPortCreate
orsrcConnRefCon
inMIDIPortConnectSource
for call functions such asMusicDeviceMIDIEvent
in yourMIDIReadProc
at that callback thread.