Hi everyone, I need help with capturing audio from the audio output (if this is possible with Java tools at all)
try { Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo(); AudioFormat f = new AudioFormat(48000, 16, 2, true, false); DataLine.Info dataLineInfo = new DataLine.Info(TargetDataLine.class, f); Mixer mixer0 = AudioSystem.getMixer(mixerInfo[0]); TargetDataLine targetDataLine = (TargetDataLine) mixer0.getLine(dataLineInfo); targetDataLine.open(f); targetDataLine.start(); } catch (Exception e) { System.out.println(e); } when choosing other mixers crashes
java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian