You can indeed save the audio buffer directly into AAC format.
While setting the ASBD, set it like this
AudioStreamBasicDescription audioFormat;
audioFormat.mFormatID = kAudioFormatMPEG4AAC;
Specify kAudioFileM4AType
while calling ExtAudioFileCreateWithURL like this:
err = ExtAudioFileCreateWithURL((CFURLRef)audioFileURL,
kAudioFileM4AType,
&audioFormat,
NULL,
kAudioFileFlags_EraseFile,
&outFile);
You also need to set the codec like this.
UInt32 codecManf = kAppleSoftwareAudioCodecManufacturer;
ExtAudioFileSetProperty(outFile, kExtAudioFileProperty_CodecManufacturer, sizeof(UInt32), &codecManf);
This should help you get your AAC encoding working.