Iphone 将一个AAC文件附加到另一个AAC文件时输出音频设置
我的应用程序使用AVAudioRecorder和音频参数逐个录制两个音频文件:Iphone 将一个AAC文件附加到另一个AAC文件时输出音频设置,iphone,objective-c,audio,aac,avassetexportsession,Iphone,Objective C,Audio,Aac,Avassetexportsession,我的应用程序使用AVAudioRecorder和音频参数逐个录制两个音频文件: NSDictionary *outputSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,
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];
我需要在文件1的末尾追加文件2。我使用的解决方案类似于(添加两个文件后通过创建AVMutableCompositionTrack附加两个音频文件,并使用AvassetExportHandler:AvassetExportAsynchronouslyWithCompletionHandler:方法导出合成)。它可以工作,但我有两个输入文件128kbs 44.1kHz 16位单声道,输出文件格式为:219.4kbs 44.1kHz 16位立体声
有没有办法为AVAssetExportSession配置输出音频文件参数?我找到了解决方案:我使用同一个库异步导出音频,但对于大型音频,此导出操作需要大量时间。有没有办法缩短这段时间。