com.jme.sound.openAL.objects.util
Class StreamPlayer

java.lang.Object
  extended bycom.jme.sound.openAL.objects.util.StreamPlayer

public class StreamPlayer
extends java.lang.Object

Author:
Arman

Method Summary
 void closeStream(int streamNumber)
          Closes the stream with the given number
static StreamPlayer getInstance()
           
 boolean isPlaying(int streamNumber)
          Pauses the stream with the given number
 float length(int streamNumber)
           
 void loopStream(int streamNumber, boolean loop)
          Closes the stream with the given number
 int openStream(java.lang.String file)
          Tries to open an ogg or wav file.
 boolean pauseStream(int streamNumber)
          Pauses the stream with the given number
 void play(int streamNumber)
           
 void stopStream(int streamNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static StreamPlayer getInstance()

openStream

public int openStream(java.lang.String file)
Tries to open an ogg or wav file. If the opening operation Is successful a unique id is returned to identify this stream;

Parameters:
file - the audio file To open
Returns:
a unique stream id. -1 if the player fails to open the file.

closeStream

public void closeStream(int streamNumber)
Closes the stream with the given number

Parameters:
streamNumber - the stream to close

loopStream

public void loopStream(int streamNumber,
                       boolean loop)
Closes the stream with the given number

Parameters:
streamNumber - the stream to close

stopStream

public void stopStream(int streamNumber)

pauseStream

public boolean pauseStream(int streamNumber)
Pauses the stream with the given number

Parameters:
streamNumber - the stream to close

isPlaying

public boolean isPlaying(int streamNumber)
Pauses the stream with the given number

Parameters:
streamNumber - the stream to close

play

public void play(int streamNumber)

length

public float length(int streamNumber)