|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.openal.AudioImpl org.newdawn.slick.openal.StreamSound
public class StreamSound
A sound implementation wrapped round a player which reads (and potentially) rereads a stream. This supplies streaming audio
Constructor Summary | |
---|---|
StreamSound(OpenALStreamPlayer player)
Create a new sound wrapped round a stream |
Method Summary | |
---|---|
float |
getPosition()
Return the current playing position in the sound |
boolean |
isPlaying()
Check if the sound is playing as sound fx |
int |
playAsMusic(float pitch,
float gain,
boolean loop)
Play this sound as music |
int |
playAsSoundEffect(float pitch,
float gain,
boolean loop)
Play this sound as a sound effect |
int |
playAsSoundEffect(float pitch,
float gain,
boolean loop,
float x,
float y,
float z)
Play this sound as a sound effect |
boolean |
setPosition(float position)
Seeks to a position in the music. |
void |
stop()
Stop the sound effect |
Methods inherited from class org.newdawn.slick.openal.AudioImpl |
---|
getBufferID, pauseMusic, restartMusic |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamSound(OpenALStreamPlayer player)
player
- The stream player we'll use to access the streamMethod Detail |
---|
public boolean isPlaying()
Audio
isPlaying
in interface Audio
isPlaying
in class AudioImpl
AudioImpl.isPlaying()
public int playAsMusic(float pitch, float gain, boolean loop)
Audio
playAsMusic
in interface Audio
playAsMusic
in class AudioImpl
pitch
- The pitch of the play backgain
- The gain of the play backloop
- True if we should loop
AudioImpl.playAsMusic(float, float, boolean)
public int playAsSoundEffect(float pitch, float gain, boolean loop, float x, float y, float z)
Audio
playAsSoundEffect
in interface Audio
playAsSoundEffect
in class AudioImpl
pitch
- The pitch of the play backgain
- The gain of the play backloop
- True if we should loopx
- The x position of the soundy
- The y position of the soundz
- The z position of the sound
AudioImpl.playAsSoundEffect(float, float, boolean, float, float, float)
public int playAsSoundEffect(float pitch, float gain, boolean loop)
Audio
playAsSoundEffect
in interface Audio
playAsSoundEffect
in class AudioImpl
pitch
- The pitch of the play backgain
- The gain of the play backloop
- True if we should loop
AudioImpl.playAsSoundEffect(float, float, boolean)
public void stop()
Audio
stop
in interface Audio
stop
in class AudioImpl
AudioImpl.stop()
public boolean setPosition(float position)
Audio
setPosition
in interface Audio
setPosition
in class AudioImpl
position
- Position in seconds.
AudioImpl.setPosition(float)
public float getPosition()
Audio
getPosition
in interface Audio
getPosition
in class AudioImpl
AudioImpl.getPosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |