|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.openal.OpenALStreamPlayer
public class OpenALStreamPlayer
A generic tool to work on a supplied stream, pulling out PCM data and buffered it to OpenAL as required.
| Field Summary | |
|---|---|
static int |
BUFFER_COUNT
The number of buffers to maintain |
| Constructor Summary | |
|---|---|
OpenALStreamPlayer(int source,
java.lang.String ref)
Create a new player to work on an audio stream |
|
OpenALStreamPlayer(int source,
java.net.URL url)
Create a new player to work on an audio stream |
|
| Method Summary | |
|---|---|
boolean |
done()
Check if the playback is complete. |
float |
getPosition()
Return the current playing position in the sound |
java.lang.String |
getSource()
Get the source of this stream |
void |
play(boolean loop)
Start this stream playing |
boolean |
setPosition(float position)
Seeks to a position in the music. |
void |
setup(float pitch)
Setup the playback properties |
boolean |
stream(int bufferId)
Stream some data from the audio stream to the buffer indicates by the ID |
void |
update()
Poll the bufferNames - check if we need to fill the bufferNames with another section. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_COUNT
| Constructor Detail |
|---|
public OpenALStreamPlayer(int source,
java.lang.String ref)
source - The source on which we'll play the audioref - A reference to the audio file to stream
public OpenALStreamPlayer(int source,
java.net.URL url)
source - The source on which we'll play the audiourl - A reference to the audio file to stream| Method Detail |
|---|
public java.lang.String getSource()
public void play(boolean loop)
throws java.io.IOException
loop - True if the stream should loop
java.io.IOException - Indicates a failure to read from the streampublic void setup(float pitch)
pitch - The pitch to play back atpublic boolean done()
public void update()
public boolean stream(int bufferId)
bufferId - The ID of the buffer to fill
public boolean setPosition(float position)
position - Position in seconds.
public float getPosition()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||