【发布时间】:2010-01-27 18:14:00
【问题描述】:
我正在使用 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 Class Reference list many settings constants,但我不知道哪些用于语音。
除此之外,如果有人知道一个好的“Dummy 的音频格式”资源,我也会接受。 (注意:我浏览过 Apple Docs,他们认为我没有数字音频知识库。)
【问题讨论】:
-
伙计,我认为在 iPad 发布当天发布此消息是一个战术错误。