1

Folks, I am working on an applet that captures audio from the local computer and streams it up to the server. I am using a Java applet that currently hooks onto the default device and performs the upstream. Things are running well.

I now want to extend the functionality to allow users to choose the audio input device and to also show a sound level indicator of the chosen device in the web page.

I wrote a multithreaded utility that would do AudioSystem.getMixerInfo(); periodically and look for changes. There is also a thread that reads from the chosen device and displays sound levels.

My problem is that when I run my code and plug in a USB headset, the new device is not detected. However, if I shut down my code, then plug in the USB, the device does show up.

Is this a known and documented limitation of JavaSound that it does not sample the device set once the process is running?

I am using OSX Lion.

Thanks for any insights.

-Raj

Raj
  • 2,852
  • 4
  • 29
  • 48
  • Interesting concept "The web page that listens back". ;) Do you have a publicly available URL available for testing (for any brave enough to trust your signed code)? I suspect results will differ by platform and JRE. – Andrew Thompson Sep 13 '11 at 05:55
  • Hi Andrew, Its not as big brotherly as it sounds but I can see the evil design, now that you point it out. I don't have the applet on a public site. The concept is rather simple: audio is captured and sent in chunks via HTTP to the server that does stuff with it, including CCing NSA and the FBI. Mac is an important platform for my user base (and my dev machine), hence a natural starting point. – Raj Sep 13 '11 at 16:50

0 Answers0