First off, I am not experienced at all with the Sound API and am looking for some quick advice. I have a mixer object and a TargetDataLine
that I want to use to record using the mixer. Here is what I have gotten:
final TargetDataLine line;
try {
line = (TargetDataLine) mixer.getLine(mixer.getLineInfo());
} catch (LineUnavailableException e) {
e.printStackTrace();
}
However, this code passes an IllegalArgumentException
when executed.
Exception in thread "Thread-14" java.lang.IllegalArgumentException: Line unsupported: interface Mixer
at com.sun.media.sound.DirectAudioDevice.getLine(Unknown Source)
at net.minecraft.src.SequenceAudioHandler.run(SequenceAudioHandler.java:32)
Does anyone have any idea why this is happening? Sorry if I am lacking basic knowledge, I'm still trying to learn.