iphone - 将一个 AAC 文件附加到另一个文件时的输出音频设置

标签 iphone objective-c audio aac avassetexportsession

我的应用使用带有音频参数的 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/

相关文章:

ios - 按日期和字符对核心数据属性进行排序

iPhone 联系人 - 获取公司名称

objective-c - Objective-C 的@try-@catch 实现如何在运行时执行的示例?

flash - 算法声音和音乐生成

matlab - Matlab将音频从模拟转换为数字

iphone - 静态库依赖项在 Xcode 3.2.3 上的模拟器中编译,在设备上失败

iphone - 时间计算给出越来越错误的结果

objective-c - 如何更改TapkuLibrary日历对象上的事件标记

ios - 如何将全屏 subview 添加到 objective-c 中的当前 UIWindow 中,这将根据设备方向发生变化?

ios - 如何使用 SKAction 循环播放音乐?