I'm interested in using the Java sound API for finding out the names of all available microphone / audio input devices, and audio output devices / speakers.
I tried the following to view what information can be provided from DataLine.Info:
final AudioFormat format = new AudioFormat(22000, 16, 2, true, true);
final TargetDataLine line;
final DataLine.Info info = new DataLine.Info(TargetDataLine.class, format);
System.out.println(info.toString());
This gave the following output:
interface TargetDataLine supporting format PCM_SIGNED 22000.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian
Which doesn't give a name of the device, though it does give some useful information.
In short: how do I use the Java Sound API (or an external library) find audio input / output information?
For anyone interested, I need the names of the devices as I'm trying to automate the set up of some Virtual Audio Cables (VACs), following the guide here, which requires certain parameters, and I'd rather not have the user type them out!