我正在使用 AVAudioRecorder 添加语音备忘录功能,我需要知道用于录制语音的录音机的最佳设置。
不幸的是,我对音频一无所知,以至于我什至不确定用谷歌搜索什么术语。
目前,我正在使用从某处复制的以下内容用于测试目的:
recorderSettingsDict=[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:kAudioFormatAppleIMA4],AVFormatIDKey,
[NSNumber numberWithInt:44100.0],AVSampleRateKey,
[NSNumber numberWithInt: 2],AVNumberOfChannelsKey,
[NSNumber numberWithInt:16],AVLinearPCMBitDepthKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
nil];
或者:
defaultSettings = {
AVFormatIDKey = 1768775988;
AVLinearPCMBitDepthKey = 16;
AVLinearPCMIsBigEndianKey = 0;
AVLinearPCMIsFloatKey = 0;
AVNumberOfChannelsKey = 2;
AVSampleRateKey = 44100;
};
这可行,但我不知道它在质量、速度、文件大小等方面是否最适合语音。
AVAudioRecorder类参考列出了许多设置常量,但我不知道哪些用于语音。
尽管如此,如果有人知道一个好的“Dummy 的音频格式”资源,我也会接受。(注意:我浏览过 Apple Docs,他们假设我不具备数字音频知识库。)