【发布时间】:2013-04-14 09:15:54
【问题描述】:
我的应用使用带有音频参数的 AVAudioRecorder 一个一个地录制两个音频文件:
NSDictionary *outputSettings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,
[NSNumber numberWithFloat:44100.0], AVSampleRateKey,
[NSNumber numberWithInt:1], AVNumberOfChannelsKey,
[NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey,
[NSNumber numberWithInt:16],AVEncoderBitDepthHintKey,
[NSNumber numberWithInt:128000], AVEncoderBitRateKey,
nil];
我需要在 file1 的末尾附加 file2。我正在使用there 之类的解决方案(在添加两个文件并使用 AVAssetExportSession 的exportAsynchronouslyWithCompletionHandler: 方法导出合成之后,通过创建 AVMutableCompositionTrack 来附加两个音频文件)。
它可以工作,但我有两个输入文件 128kbs 44.1kHz 16bit 单声道,输出文件格式是:219.4kbs 44.1kHz 16bit 立体声。
有什么方法可以为 AVAssetExportSession 配置输出音频文件参数吗?
【问题讨论】:
标签: iphone objective-c audio aac avassetexportsession