6

My app records two audio files one by one using AVAudioRecorder with audio parameters:

        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];

I need append file2 at the end of file1. I'm using solution like there (appending two audio files by creating a AVMutableCompositionTrack after adding the two files and exporting the composition using exportAsynchronouslyWithCompletionHandler: method of AVAssetExportSession).
It works, but I have two input files 128kbs 44.1kHz 16bit mono, and output file format is: 219.4kbs 44.1kHz 16bit stereo.

Is any way to configure output audio file parameters for AVAssetExportSession?

4

1 回答 1

3

我找到了解决方案:SDAVAssetExportSession

于 2013-04-16T14:18:42.690 回答