Using the mic
robertiii last edited by
How would I listen for a certain volume threshold and then do an action when the volume threshold reaches that point. I just want to use the built default input and listen for sound until it hits the threshold
JonB last edited by
here is something quick and dirty that updates the level meters within a custom view, and displays the result.
you could add logic within udate() to check if recorder.peakPowerForChannel_(0) > some threshold, then take some action. the units are dB where -160 is totally quiet, and 0 is max input exceeded.