Package javax.sound.sampled

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


        // by the system.
       
        // open the audio input (line-in or microphone)
        targetDataLine = (TargetDataLine) AudioSystem.getLine(inputLineInfo);
        targetDataLine.open(inputAudioFormat, bInputBuffer.length);
        targetDataLine.start();
       
        // open the audio output
        sourceDataLine = (SourceDataLine) AudioSystem.getLine(outputLineInfo);
        sourceDataLine.open(outputAudioFormat, bOutputBuffer.length);
        sourceDataLine.start();
View Full Code Here


    final String murl = urlStr;
    final TargetDataLine mtl = tl;
    final AudioFormat maf = af;
    if(!mtl.isOpen()){
      mtl.open(maf);
      mtl.start();
    }
    new Thread ("Upstream Thread") {
      public void run() {
        openHttpsPostConnection(murl, mtl, maf);
      }
View Full Code Here

    final AudioInputStream outDinSound = outDin;

    if (isMicro) {
      try {
        line.open(format);
        line.start();
      } catch (LineUnavailableException e) {
        e.printStackTrace();
      }
    }
View Full Code Here

        TargetDataLine target_data_line = null;
        target_data_line = (TargetDataLine) AudioSystem.getLine(data_line_info);
        if (listener != null)
            target_data_line.addLineListener(listener);
        target_data_line.open(audio_format);
        target_data_line.start();
        return target_data_line;
    }


    /**
 
View Full Code Here

        TargetDataLine target_data_line = null;
        target_data_line = (TargetDataLine) mixer.getLine(data_line_info);
        if (listener != null)
            target_data_line.addLineListener(listener);
        target_data_line.open(audio_format);
        target_data_line.start();
        return target_data_line;
    }


    /**
 
View Full Code Here

        ByteArrayOutputStream out  = new ByteArrayOutputStream();
        int numBytesRead;
        byte[] data = new byte[line.getBufferSize() / 5];

        // Begin audio capture.
        line.start();

        // Here, stopped is a global boolean set by another thread.
        while(out.size() < bytesRequired) {
           // Read the next chunk of data from the TargetDataLine.
           numBytesRead =  line.read(data, 0, data.length);
View Full Code Here

          linearFormat);
      TargetDataLine targetDataLine = (TargetDataLine) AudioSystem
          .getLine(info);

      targetDataLine.open(linearFormat);
      targetDataLine.start();

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

          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);
      targetDataLine.stop();
View Full Code Here

    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
      sl.open(af); // �ffnen
View Full Code Here

        }

        total++;

        log("    start...");
        line.start();

        AsyncLineStopper lineStopper = new AsyncLineStopper(line, STOPPER_DELAY);
        int offset = scenario.getBufferOffset(line);
        int len = scenario.getBufferLength(line);
        // ensure len represents integral number of frames
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.