我的应用使用带有音频参数的 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 16 位单声道,输出文件格式为:219.4kbs 44.1kHz 16 位立体声。
有什么方法可以配置AVAssetExportSession的输出音频文件参数吗?
最佳答案
我找到了解决方案:SDAVAssetExportSession
关于iphone - 将一个 AAC 文件附加到另一个文件时的输出音频设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15997474/