New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing Buffer Size #84
Comments
For only the microphone component? If it's purely for a graphical display then you can adjust the rollingHistoryLength on the audio plot. [self.audioPlot setRollingHistoryLength:128] For the microphone it will default to the buffer size specified by the AVAudioSession, so before instantiating the microphone you could try adjusting the preferred IO buffer duration like: NSError* err;
[[AVAudioSession sharedInstance] setPreferredIOBufferDuration:(DURATION IN SECONDS) error:&err]; |
Yes, this is for the microphone. When the microphone is on, in the Setting the preferred IO buffer duration does not change |
Now I can run it with any window size to get better resolution. -(void)microphone:(EZMicrophone *)microphone hasAudioReceived:(float **)buffer withBufferSize:(UInt32)bufferSize withNumberOfChannels:(UInt32)numberOfChannels {
} |
Jean, would you mind posting the Xcode project, so I can get a feel for how it works? If not, what are FFTLEN and fftBufIndex initialized as? |
const UInt32 FFTLEN = 4410; |
JeanRintoul or LikasJoswiak, did either of you manage to get a FFTViewController that could measure the Hz of a sound through the microphone with greater accuracy than that which is provided for with a buffer size of 512? I'm trying to manage increasing its accuracy (most likely by increasing buffer size) but am coming up short. |
As of 1.1.0 you can just use the EZAudioFFTRolling to get an FFT with a larger window. Please check out the answer for #185 for a code example of how to store more than 512 audio samples using an EZPlotHistoryInfo structure. Also, the EZAudioFFTExample has been updated to be a high resolution pitch detector using a 4096 length FFT. |
I have been searching for a way to change the buffer size to increase the number of data points received per second.
This issue (#50) is similar to what I am trying to do, but there does not appear to be an answer. How do I decrease the buffer size?
Thanks!
The text was updated successfully, but these errors were encountered: