Applicet Framework for Applets and Applications v2.03

be.arci.applet
Class FallbackAudioClip

java.lang.Object
  |
  +--be.arci.applet.FallbackAudioClip
All Implemented Interfaces:
java.applet.AudioClip

public class FallbackAudioClip
extends java.lang.Object
implements java.applet.AudioClip

Fallback for loadig AudioClips for applications in pre-Java 2 environments. FallbackAudioClip will try to construct an AudioClip using the non-standard but widely used sun.audio.* API.


Constructor Summary
FallbackAudioClip(byte[] ab)
          Constructs a new audioclip from a byte[]
FallbackAudioClip(java.io.InputStream is)
          Constructs a new audioclip from an inputstream; the InputStream will be closed.
FallbackAudioClip(java.lang.String filename)
          Constructs a new audioclip from a filename
FallbackAudioClip(java.net.URL url)
          Constructs a new audioclip from a URL, if we could not delegate AudioClip creation to the new JDK12 Applet.newAudioClip(URL).
 
Method Summary
 void loop()
          Starts playing this audio clip in a loop.
 void play()
          Starts playing this audio clip.
 void stop()
          Stops playing this audio clip.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FallbackAudioClip

public FallbackAudioClip(java.net.URL url)
                  throws java.io.IOException
Constructs a new audioclip from a URL, if we could not delegate AudioClip creation to the new JDK12 Applet.newAudioClip(URL).

FallbackAudioClip

public FallbackAudioClip(java.lang.String filename)
                  throws java.io.IOException
Constructs a new audioclip from a filename

FallbackAudioClip

public FallbackAudioClip(byte[] ab)
                  throws java.io.IOException
Constructs a new audioclip from a byte[]

FallbackAudioClip

public FallbackAudioClip(java.io.InputStream is)
                  throws java.io.IOException
Constructs a new audioclip from an inputstream; the InputStream will be closed.
Method Detail

play

public void play()
Starts playing this audio clip. Each time this method is called, the clip is restarted from the beginning.
Specified by:
play in interface java.applet.AudioClip

loop

public void loop()
Starts playing this audio clip in a loop.
Specified by:
loop in interface java.applet.AudioClip

stop

public void stop()
Stops playing this audio clip.
Specified by:
stop in interface java.applet.AudioClip

Applicet Framework for Applets and Applications v2.03