Input Level Control with the Java Sound API

I would like to control the microphone input level in the Java Sound API (and create a small input level meter user interface). I'm not interested in capturing just to make sure the device is ready / working.

Any idea is welcome.

+6
java audio level meter
source share
2 answers

I have never done anything with sound, but DataLine available() and getLevel() sounds interesting. If you have not read the tutorials .

+2
source share

I found this sound by capturing a java code example :

combined with a timer, redrawing jPanel9 , and this function (since getLevel () does not work) Link

I have a sound level meter. I hope this helps, since I could not find someone who did it right, this is due to setting some constants (the number of bytes to read and the timing of the redraw) to make it look smooth.

+1
source share

All Articles