public SourceDataLine getOutputLine(AudioFormat format) throws LineUnavailableException { SourceDataLine out; DataLine.Info info = new DataLine.Info(SourceDataLine.class, format); out = (SourceDataLine) mixer.getLine(info); out.open(format, out.getBufferSize()); return out; }
public TargetDataLine getInputLine(AudioFormat format) throws LineUnavailableException { TargetDataLine in; DataLine.Info info = new DataLine.Info(TargetDataLine.class, format); in = (TargetDataLine) mixer.getLine(info); in.open(format, in.getBufferSize()); return in; }