Class AppletAudioClip

java.lang.Object
net.sourceforge.jnlp.runtime.AppletAudioClip
All Implemented Interfaces:
AudioClip

public class AppletAudioClip extends Object implements AudioClip
An applet audio clip using the javax.sound API.
Version:
$Revision: 1.8 $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Clip
    the clip
    private static final Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AppletAudioClip(URL location)
    Creates new AudioClip.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    Stops playing the clip and disposes it; the clip cannot be played after being disposed.
    void
    Plays the clip in a continuous loop until the stop method is called.
    void
    Plays the clip from the beginning.
    void
    Stops playing the clip.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      private static final Logger LOG
    • clip

      private Clip clip
      the clip
  • Constructor Details

    • AppletAudioClip

      public AppletAudioClip(URL location)
      Creates new AudioClip. If the clip cannot be opened no exception is thrown, instead the methods of the AudioClip return without performing any operations.
      Parameters:
      location - the clip location
  • Method Details

    • loop

      public void loop()
      Plays the clip in a continuous loop until the stop method is called.
      Specified by:
      loop in interface AudioClip
    • play

      public void play()
      Plays the clip from the beginning.
      Specified by:
      play in interface AudioClip
    • stop

      public void stop()
      Stops playing the clip.
      Specified by:
      stop in interface AudioClip
    • dispose

      void dispose()
      Stops playing the clip and disposes it; the clip cannot be played after being disposed.