Cocoa touch 如何使用奴佛卡因获得特定频率下的分贝
目前,我正在使用麦克风并从中获取声音。 但我在缓冲一首长歌时遇到了麻烦。。。 似乎能够很好地处理音频播放,并且拥有我所需要的一切,除了我无法了解如何检索特定频率下的声音振幅(分贝)Cocoa touch 如何使用奴佛卡因获得特定频率下的分贝,cocoa-touch,audio,novocaine,Cocoa Touch,Audio,Novocaine,目前,我正在使用麦克风并从中获取声音。 但我在缓冲一首长歌时遇到了麻烦。。。 似乎能够很好地处理音频播放,并且拥有我所需要的一切,除了我无法了解如何检索特定频率下的声音振幅(分贝) NSURL *inputFileURL = [[NSBundle mainBundle] URLForResource:@"TLC" withExtension:@"mp3"]; fileReader = [[AudioFileReader alloc] ini
NSURL *inputFileURL = [[NSBundle mainBundle] URLForResource:@"TLC" withExtension:@"mp3"];
fileReader = [[AudioFileReader alloc]
initWithAudioFileURL:inputFileURL
samplingRate:audioManager.samplingRate
numChannels:audioManager.numOutputChannels];
[fileReader play];
[audioManager setOutputBlock:^(float *data, UInt32 numFrames, UInt32 numChannels)
{
[fileReader retrieveFreshAudio:data numFrames:numFrames numChannels:numChannels];
// i believe here should lay the code for detecting the amplitude at 1000 HZ
}];
我对声音分析太不在行了,欢迎任何帮助