Package javax.sound.sampled

Examples of javax.sound.sampled.TargetDataLine.open()


      DataLine.Info info = new DataLine.Info(TargetDataLine.class,
          soundFormat);
      TargetDataLine targetDataLine = (TargetDataLine) AudioSystem
          .getLine(info);

      targetDataLine.open(soundFormat);
      targetDataLine.start();

      AudioInputStream linearStream = new AudioInputStream(targetDataLine);
      linearStream.read(voiceData, 0, voiceData.length);
      analyzeArray(voiceData);
View Full Code Here


    DataLine.Info info = new DataLine.Info(TargetDataLine.class,
        audioFormat);
    TargetDataLine targetDataLine = null;
    try {
      targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
      targetDataLine.open(audioFormat);
    } catch (LineUnavailableException e) {
      out("unable to get a recording line");
      e.printStackTrace();
      System.exit(1);
    }
View Full Code Here

    DataLine.Info sinfo = new DataLine.Info(SourceDataLine.class, af);

    try {
      ByteArrayOutputStream baOut = new ByteArrayOutputStream();
      TargetDataLine tl = (TargetDataLine) AudioSystem.getLine(info);
      tl.open(af);
      tl.start();
      SourceDataLine sl = (SourceDataLine) AudioSystem.getLine(sinfo); // Neu:
                                        // Line
                                        // f�r
                                        // Tonausgabe
View Full Code Here

        TargetDataLine line = null;
        try {
            line = (TargetDataLine)mixer.getLine(linfo);
            log("    got line: " + line);
            log("    open...");
            line.open();
        } catch (IllegalArgumentException ex) {
            log("    unsupported (IllegalArgumentException)");
            return;
        } catch (LineUnavailableException ex) {
            log("    unavailable: " + ex);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.