Пример #1
0
  protected void createLineImpl() throws Exception {
    DataLine.Info info = new DataLine.Info(TargetDataLine.class, lineFormat);

    // get and open the target data line for capture.
    if (mixer != null) {
      line = (TargetDataLine) mixer.getLine(info);
    } else {
      line = AudioSystem.getTargetDataLine(lineFormat);
    }
  }
Пример #2
0
 protected void openLineImpl() throws Exception {
   TargetDataLine tdl = (TargetDataLine) line;
   tdl.open(lineFormat, bufferSize);
   ais = new TargetDataLineMeter(tdl);
   ais = AudioSystem.getAudioInputStream(netFormat, ais);
 }