Skip to content
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

If computeFreqFromFFT() is called before enough data is accumulated, fft.forward(timeData) (line 468) fails #4

Open
benmurrell opened this issue Feb 20, 2014 · 0 comments

Comments

@benmurrell
Copy link

If the FFT method is used to determine frequency before enough data has been collected in timeData, the call to fft.forward() on line 468 will fail.

This is possible when isInitialized() returns true - this behavior should be documented, a cleaner/more descriptive failure mode should occur, and/or another function should be added to check whether the fft method can be used yet.

To reproduce this, you need to call a method like getFreq(2) immediately after the microphone becomes initialized. I modified the library to call a callback when the microphone becomes initialized - calling getFreq(2) from there triggers this behavior. Since your demo requires a user click before getFreq will be called, it is difficult reproduce in the demo as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant