The Amazing Audio Engine クラス AERecorder を使用して、内蔵マイクからオーディオを録音しています。ダウンロードに付属のサンプル プロジェクトを確認しました。AERecorderを使用するために、TAAE ドキュメントに示されているコードも実装しました。
私の知る限り、オーディオを録音するために必要なものはすべて揃っています。残念ながら、ファイルは作成され、ヘッダーはそこにありますが、必要なオーディオ データはありません。私が把握できるのは、AEAudioController または Xcode プロジェクトの設定に何か問題があるということだけです。
参考までに、私のプロジェクトは ARC を使用しています。ドキュメントの指示に従って、-fno-objc-arcインポートされたソースにコンパイラ フラグを追加したと思います。
他の誰かがこの問題に遭遇しましたか? もしそうなら、どのように解決されましたか?
TAAE フォーラムでこの質問をしたかったのですが、サインアップできません。
これは、リンクをたどりたくない人のためのコードです。
編集: 以下のコードは、以前に欠けていた詳細を示すために更新されています。
- (void)viewDidLoad
{
   [super viewDidLoad]
   self.audioController = [[AEAudioController alloc] 
                       initWithAudioDescription:[AEAudioController nonInterleavedFloatStereoAudioDescription] 
                                   inputEnabled:YES];
   //************************
   // This is the crucial bit of code that was missing
   NSError *error;
   [audioController start:&error];
   //************************
}
- (void)beginRecording {
   // Init recorder
   self.recorder = [[AERecorder alloc] initWithAudioController:_audioController];
   NSString *documentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) 
                               objectAtIndex:0];
   NSString *filePath = [documentsFolder stringByAppendingPathComponent:@"Recording.aiff"];
   // Start the recording process
   NSError *error = NULL;
   if ( ![_recorder beginRecordingToFileAtPath:filePath 
                                     fileType:kAudioFileAIFFType 
                                        error:&error] ) {
      // Report error
      return;
   }
   // Receive both audio input and audio output. Note that if you're using
   // AEPlaythroughChannel, mentioned above, you may not need to receive the input again.
   [_audioController addInputReceiver:_recorder];
   [_audioController addOutputReceiver:_recorder];
}
-(void)stopRecording
{
    [_recorder finishRecording];
    [_audioController removeInputReceiver:_recorder];
    [_audioController removeOutputReceiver:_recorder];
    self.recorder = nil;
}