2010-07-07 4 views
2

다음 오디오 녹음 포맷을 WAV로 변환하기 때문에 iPhone 오디오 녹음에서 고려해야 할 오디오 녹음 포맷은 무엇입니까? 따라서 iPhone의 오디오 녹음 포맷을 WAV 포맷으로 변환 할 수있는 라이브러리가있는 나를 안내 해주십시오.iPhone의 오디오 녹음 형식은 무엇입니까?

감사합니다.

답변

2

AVAudioRecorder은 이전 SDK 버전보다 훨씬 간단하게 오디오 녹음을합니다. 필요에 맞게 녹음하기 전에 구성 할 수 있습니다.

NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init]; 
    [recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey]; 
    [recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey]; 
    [recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey]; 

및이 초기화 동안 기록 할 사용됩니다 :

다음 설정은 WAV 파일에 맞게 구성해야

recorder = [[ AVAudioRecorder alloc] initWithURL:fileURL settings:recordSetting error:&error];