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

AudioFrequencyMeter returns only integer values #16

Open
MrMarkB opened this issue Dec 2, 2020 · 0 comments
Open

AudioFrequencyMeter returns only integer values #16

MrMarkB opened this issue Dec 2, 2020 · 0 comments
Labels
type: imperfection Perceived defect in any part of project

Comments

@MrMarkB
Copy link

MrMarkB commented Dec 2, 2020

getFrequency() method returns a floating point number, but the number is a result of integer division converted to floating point. Hence the return value is always integer albeit in floating point format.

Issue is on line 126 of the source module: frequency = (float)(sampleRate / period);

See discussion at https://forum.arduino.cc/index.php?topic=716159.msg4813625;topicseen#msg4813625

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants