문제

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?

도움이 되었습니까?

해결책

I was found the solution: SDAVAssetExportSession

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top