これは iPhone 関連の質問です。openAL を使用してサウンドを再生します (ゲイン、ピッチなどを管理する必要があります)。再生しているものを録音したいのですが、AVAudioRecorder を使用していますが、「prepareToRecord」を実行すると、openAL がオーディオの再生を停止します。どうしたの?私が使用する IBAction のレコードは次のとおりです。
- (IBAction) record: (id) sender
{
NSError *error;
NSMutableDictionary *settings = [NSMutableDictionary dictionary];
[settings setValue: [NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
[settings setValue: [NSNumber numberWithFloat:8000.0] forKey:AVSampleRateKey];
[settings setValue: [NSNumber numberWithInt: 1] forKey:AVNumberOfChannelsKey];
[settings setValue: [NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
[settings setValue: [NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
[settings setValue: [NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
NSURL *url = [NSURL fileURLWithPath:FILEPATH];
self.recorder = [[AVAudioRecorder alloc] initWithURL:url settings:settings error:&error];
self.recorder.delegate = self;
self.recorder.meteringEnabled = YES;
[self.recorder prepareToRecord];
[self.recorder record];
}
ありがとう
編集:
AudioQueueの録音も試しました。今回は、次のコードの後、音が停止します。
status = AudioQueueEnqueueBuffer(recordState.queue, recordState.buffers[i], 0, NULL);
ということはopenALでiPhoneのプレイを録画することは可能でしょうか???
再度、感謝します