startInput will start it sampling at 2000 samples per second
When one buffer is full (in 128 / 2000 = 0.064 of a second) it'll call your code with that buffer, while it's busy reading samples into the second buffer
It calls you again when the second buffer is full (and it starts writing to the first)
And so on... You need to be finished with each buffer within 0.064 of a second or it'll start writing to the buffer as you're working on it
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ahh, nope... Basically:
startInput
will start it sampling at 2000 samples per second128 / 2000 = 0.064
of a second) it'll call your code with that buffer, while it's busy reading samples into the second buffer