Package java.applet

Examples of java.applet.AudioClip


    sp.play(url);
    sp.play(url);
  }

  public void play1(URL url){
    AudioClip clip = Applet.newAudioClip(url);
    clip.play();
  }
View Full Code Here


            //you need an au file format to use this method
            URL url = new URL(
                strFileName);
           // "file://" +   System.getProperty("user.dir") +   "/src/edu/uchicago/cs/java/lec10/playsounds/snds/samisen.au");
            AudioClip clip = Applet.newAudioClip(url);
            clip.loop();
    
            //clip.play();

          
            //Thread.sleep(Long.MAX_VALUE);  //this is ugly, but it works without throwing an exception
View Full Code Here

    try {

      //you need an au file to do it.
      URL url = new URL(
      "file://" +   System.getProperty("user.dir") +   "/src/edu/uchicago/cs/java/lec10/playsounds/snds/samisen.au");
      AudioClip clip = Applet.newAudioClip(url);

      clip.play();

      Thread.sleep(5000);
   
    } catch (InterruptedException e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of java.applet.AudioClip

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.