Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 将一个AAC文件附加到另一个AAC文件时输出音频设置_Iphone_Objective C_Audio_Aac_Avassetexportsession - Fatal编程技术网

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

Iphone 将一个AAC文件附加到另一个AAC文件时输出音频设置,iphone,objective-c,audio,aac,avassetexportsession,Iphone,Objective C,Audio,Aac,Avassetexportsession,我的应用程序使用AVAudioRecorder和音频参数逐个录制两个音频文件: NSDictionary *outputSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,

我的应用程序使用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];
我需要在文件1的末尾追加文件2。我使用的解决方案类似于(添加两个文件后通过创建AVMutableCompositionTrack附加两个音频文件,并使用AvassetExportHandler:AvassetExportAsynchronouslyWithCompletionHandler:方法导出合成)。
它可以工作,但我有两个输入文件128kbs 44.1kHz 16位单声道,输出文件格式为:219.4kbs 44.1kHz 16位立体声


有没有办法为AVAssetExportSession配置输出音频文件参数?

我找到了解决方案:

我使用同一个库异步导出音频,但对于大型音频,此导出操作需要大量时间。有没有办法缩短这段时间。