I look at the functions of the Audio Unit for recording. Everything is fine, except that the recording callbacks stop when the application is in the background, unlike AVCapture, which saves the recording in the background using the RED BAR. Is there a way to get this to continue recording in the background, like in AVCapture?
#import "AudioUnit/AudioComponent.h" #import "AudioUnit/AudioUnit.h" desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_RemoteIO; desc.componentFlags = 0; desc.componentFlagsMask = 0; desc.componentManufacturer = kAudioUnitManufacturer_Apple; AudioComponent inputComponent = AudioComponentFindNext(NULL, &desc); status = AudioComponentInstanceNew(inputComponent, &audioUnit); checkStatus(status); UInt32 flag = 1; status = AudioUnitSetProperty(audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, kInputBus, &flag, sizeof(flag)); checkStatus(status);
ort11 source share