I can not solve this problem : I try to add Inter App Audio to my iPad synthesizer, but I always encounter this message when I launch on the iPad:
AVAudioSession *session = [AVAudioSession sharedInstance];
//(activation of the audio session)
//(adding kAudioSessionCategory_PlayAndRecord and kAudioSessionProperty_AudioInputAvailable to the session)
(…)
AudioComponentDescription cd = {0};
cd.componentType = kAudioUnitType_Output;
cd.componentSubType = kAudioUnitSubType_RemoteIO;
cd.componentManufacturer = kAudioUnitManufacturer_Apple;
cd.componentFlags = 0;
cd.componentFlagsMask = 0;
AudioComponent comp = AudioComponentFindNext (NULL, &cd);
if (comp == NULL) {
printf ("can't get output unit");
exit (-1);
}
AudioComponentInstanceNew(comp, &dazUnit); //dazUnit is the audioUnit
// register render callback
UInt32 _oneFlag_ = 1;
AudioUnitElement bus0 = 0;
AudioUnitSetProperty (dazUnit,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Output,
bus0,
&oneFlag,
sizeof(oneFlag));
input.inputProc = MyAURenderCallback; //the render of the synth
input.inputProcRefCon = (__bridge void *)(self);
AudioUnitElement bus1 = 1;
AudioUnitSetProperty(dazUnit,
kAudioUnitProperty_SetRenderCallback,
kAudioUnitScope_Input,
0,
&input,
sizeof(input));
//(I add after the kAudioUnitProperty_StreamFormat)
// I initialize and start the audio unit