How to get the decibels at specific frequency using Novocaine

372 Views Asked by At

Currently i'm doing this using AurioTouch and getting sound from microphone. But I'm having trouble with buffering a long song... Novocaine seems to handle audioplayback very well and has everything i need except that i cant get out how to retrieve the sound amplitude (decibels) at a specific frequency.

    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
 }];

I'm too noobish at sound analysis and any help will be welcome!

0

There are 0 best solutions below