NASA World Wind

gov.nasa.worldwind.examples.util
Class AudioPlayer

java.lang.Object
  extended by gov.nasa.worldwind.examples.util.AudioPlayer

public class AudioPlayer
extends Object

Plays an audio file.


Field Summary
static String STATUS_PAUSE
           
static String STATUS_PLAY
           
static String STATUS_STOP
           
 
Constructor Summary
AudioPlayer()
           
AudioPlayer(File audioFile)
           
AudioPlayer(URL audioURL)
           
 
Method Summary
 URL getAudioURL()
           
 long getMillisecondLength()
           
 long getMillisecondPosition()
           
 String getStatus()
           
 void pause()
           
 void play()
           
 void setAudioURL(URL audioURL)
           
 void setMillisecondPosition(long position)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_PAUSE

public static final String STATUS_PAUSE
See Also:
Constant Field Values

STATUS_PLAY

public static final String STATUS_PLAY
See Also:
Constant Field Values

STATUS_STOP

public static final String STATUS_STOP
See Also:
Constant Field Values
Constructor Detail

AudioPlayer

public AudioPlayer()

AudioPlayer

public AudioPlayer(File audioFile)
            throws IOException,
                   UnsupportedAudioFileException,
                   LineUnavailableException
Throws:
IOException
UnsupportedAudioFileException
LineUnavailableException

AudioPlayer

public AudioPlayer(URL audioURL)
            throws IOException,
                   UnsupportedAudioFileException,
                   LineUnavailableException
Throws:
IOException
UnsupportedAudioFileException
LineUnavailableException
Method Detail

getAudioURL

public URL getAudioURL()

getMillisecondLength

public long getMillisecondLength()

getMillisecondPosition

public long getMillisecondPosition()

getStatus

public String getStatus()

pause

public void pause()

play

public void play()

setAudioURL

public void setAudioURL(URL audioURL)
                 throws IOException,
                        UnsupportedAudioFileException,
                        LineUnavailableException
Throws:
IOException
UnsupportedAudioFileException
LineUnavailableException

setMillisecondPosition

public void setMillisecondPosition(long position)

stop

public void stop()

NASA World Wind