At now I save file by recording it from AVAudioUnitEQ.
[mainEQ installTapOnBus:0 bufferSize:0 format:[mainEQ outputFormatForBus:0] block:^(AVAudioPCMBuffer *buf, AVAudioTime *when){
if(!recordIsGoing){
[mainEQ removeTapOnBus:0];
}
else{
[writeAudioFile writeFromBuffer:buf error:nil];
// NSLog(@"%lld", writeAudioFile.length);
}
}];
But this method requires a prior file playback . Is there a way to save the mixed file without playing ?
UPD: I can get AUAudioUnit.outputBusses[0] to mainEQ. The challenge now is to take out the data and hope that they will be such what I need.
RESOLVED: Issue been resolved by this answer Can I use AVAudioEngine to read from a file, process with an audio unit and write to a file, faster than real-time?