我使用AVAudioRecorder进行录音并保存为WAV文件(使用SDK 3.0)的设置字典包含下列值iphone - AVAudioRecorder给单声道播放(声音在短短的一个通道播放)
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];
[recordSetting setValue :[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
即使在将通道数量指定为2之后,回放是单声道的(即,仅在1个耳机插孔中而不是两个通道中播放)。
有其他人遇到过这个问题吗? recordSetting字典值有什么问题吗?
感谢
任何人都可以请帮我这...如果我指定的通道数为2,回放为什么会在短短的一个插孔? (我正在使用耳机进行测试 - 与我的iPhone一起使用的耳机)
@lostInTransit,这是无关紧要的:您可能希望通过用户页面最右侧的“accounts”标签将您的SO帐户与SU,SF和Meta相关联。你最近的问题转移到了SU。 – nik 2009-08-08 09:15:59
尼克,我不明白这是如何属于苏。这与通过SDK录制声音时需要为AVAudioRecorder设置的属性相关。非常感谢将最后一个问题提交给SU。 – lostInTransit 2009-08-08 14:28:26