Package javax.sound.sampled

Examples of javax.sound.sampled.Line$Info


  }
 
  private void createSource(){
    fmtTarget = decoder.getAudioFormat();
    try {
      Line line = AudioSystem.getLine(new DataLine.Info(SourceDataLine.class, fmtTarget));
      if (line instanceof SourceDataLine) {
        source = (SourceDataLine) line;
        source.open(fmtTarget);
        source.start();
      }
View Full Code Here


     * clip if required.
     * @param event the line event to follow
     */
    public void update(LineEvent event) {
        if (event.getType().equals(LineEvent.Type.STOP)) {
            Line line = event.getLine();
            line.close();
        }
    }
View Full Code Here

     * This is implemented to listen for any line events and closes the
     * clip if required.
     */
    public void update(LineEvent event) {
        if (event.getType().equals(LineEvent.Type.STOP)) {
            Line line = event.getLine();
            line.close();
        } else if (event.getType().equals(LineEvent.Type.CLOSE)) {
            /*
             *  There is a bug in JavaSound 0.90 (jdk1.3beta).
             *  It prevents correct termination of the VM.
             *  So we have to exit ourselves.
View Full Code Here

     * This is implemented to listen for any line events and closes the
     * clip if required.
     */
    public void update(LineEvent event) {
        if (event.getType().equals(LineEvent.Type.STOP)) {
            Line line = event.getLine();
            line.close();
        } else if (event.getType().equals(LineEvent.Type.CLOSE)) {
            /*
             *  There is a bug in JavaSound 0.90 (jdk1.3beta).
             *  It prevents correct termination of the VM.
             *  So we have to exit ourselves.
View Full Code Here

  protected SourceDataLine createSource() throws JavaLayerException
    {
        Throwable t = null;
        try
        {
      Line line = AudioSystem.getLine(getSourceLineInfo());
            if (line instanceof SourceDataLine)
            {
             source = (SourceDataLine)line;
                //source.open(fmt, millisecondsToBytes(fmt, 2000));
        source.open(fmt);
View Full Code Here

TOP

Related Classes of javax.sound.sampled.Line$Info

Copyright © 2018 www.massapicom. 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.