Open r0boto opened 9 years ago
r0boto did you get anywhere with this? I'm having the same issue.
change "audioPoll" to "micVolume"
sorry folks,I would love to be more active in this project but I am absolutely jampacked with work on other projects. If anyone wants to write a patch and pull request it, I'd be happy to comply. Best I can came up with right now : /
No problem man, I understand! I've got it working but may I ask if you can remember if the values it gave when you used it fluctuated quite a bit? It's definitely able to tell what's loud and what's quiet but the values can change by a value of up to roughly 10, without the ambient noise really changing.
This is the same problem that I've always had with it - it returns values, but the values are mostly random noise. You can make out general peaks or troughs that correspond with your room noise, but it's still all over the place.
My take on this was that either I was not initializing the AndroidRecord object properly, ie
new AudioRecord(src,freq,chan,enc,buflen);
was getting some incorrect src, encoding, freq etc, but trawling through the Android SDK documentation and examples I couldn't find any other way of doing this.
Or, I was polling incorrectly :
int bufferReadResult = audioRecord.read(buffer, 0, buffer.length);
I even put some kind of average-over-time on that to flatten out the noise, but it was still all over the place. I tried different buffer sizes (it's currently at 1024), but that didn't help either. Have you tried using a much larger (orders of mag) buffer size? Pretty much every example I've seen pegs buffer size at about 1024 though.
Hi, i tried to use plugin by this way:
But it throwing this error: Uncaught ReferenceError: audioPoll is not defined
I checked that plugin is in list of installed plugins and i found it there:
com.shukriadams.micVolume 0.1.0 "MicVolume"
What can be wrong please?