-
Notifications
You must be signed in to change notification settings - Fork 179
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
Added auto-calibration #9
base: master
Are you sure you want to change the base?
Conversation
@dracolytch
Wouldn't this sort of continuously lower the maxVolumeRatio if there's no activity? |
Yes, to a point. If we can't hear anything, it's either because a) there's nothing to hear, or b) the setting is too high and we're not listening. So we reduce the ratio... But after a while we'll reduce into the point where background white noise will trigger direction changes, causing it to stop going down. If things are really quiet, or there's no motion, the worst-case is for the ratio to get just a bit lower than we'd ideally like, but where it still is responsive to the user. If the mic or speakers are off, it could get turned WAY down, so I believe I put in a min value check, so we never hit 0.
@dracolytch |
Ah. When would you stop calibrating/how would you know when it's at the On Tue, Mar 17, 2015, 8:34 PM dracolytch notifications@github.com wrote:
|
I think it depends on the application. For my tests, I just left it on, since it would adjust as my environment adjusted, and it didn't seem to take up a lot of additional processing power. I did include the ability to turn off calibration to get those CPU cycles back, but without constant monitoring, you'll require some kind of interaction with the user to perform calibration ("Don't move for 5 seconds while we calibrate" kind of dialog), and then have to hope the environment (including computer speaker volume) doesn't change too much.
Ah. When would you stop calibrating/how would you know when it's at the On Tue, Mar 17, 2015, 8:34 PM dracolytch notifications@github.com wrote:
|
Tested on three devices, auto-calibration seems to work fairly well.