|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectzombie.openal.AudioImpl
zombie.openal.DeferredSound
public class DeferredSound
A sound implementation that can load the actual sound file at a later point.
| Field Summary | |
|---|---|
static int |
AIF
Indicate a AIF to be loaded |
static int |
MOD
Indicate a MOD/XM to be loaded |
static int |
OGG
Indicate a OGG to be loaded |
static int |
WAV
Indicate a WAV to be loaded |
| Fields inherited from class zombie.openal.AudioImpl |
|---|
volDelta |
| Constructor Summary | |
|---|---|
DeferredSound(java.lang.String ref,
java.io.InputStream in,
int type)
Create a new sound on request to load |
|
| Method Summary | |
|---|---|
java.lang.String |
getDescription()
get a description of the resource to be loaded |
boolean |
isPlaying()
Check if the sound is playing as sound fx |
void |
load()
Load the actual resource |
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,
float radius)
Play this sound as a sound effect |
void |
stop()
Stop the sound effect |
| Methods inherited from class zombie.openal.AudioImpl |
|---|
getBufferID, getPosition, getRange, initAudioImpl, pauseMusic, playAsSoundEffectUnbuffered, restartMusic, setID, setPosition, setPosition, setRange, setVolume |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int AIF
public static final int MOD
public static final int OGG
public static final int WAV
| Constructor Detail |
|---|
public DeferredSound(java.lang.String ref,
java.io.InputStream in,
int type)
ref - The location of the sound to loadtype - The type of sound to loadin - The input stream to load from| Method Detail |
|---|
public java.lang.String getDescription()
DeferredResource
getDescription in interface DeferredResourceorg.newdawn.slick.loading.DeferredResource#getDescription()public boolean isPlaying()
Audio
isPlaying in interface AudioisPlaying in class AudioImplorg.newdawn.slick.openal.AudioImpl#isPlaying()
public void load()
throws java.io.IOException
DeferredResource
load in interface DeferredResourcejava.io.IOException - Indicates a failure to load the resourceorg.newdawn.slick.loading.DeferredResource#load()
public int playAsMusic(float pitch,
float gain,
boolean loop)
Audio
playAsMusic in interface AudioplayAsMusic in class AudioImplpitch - The pitch of the play backgain - The gain of the play backloop - True if we should loop
org.newdawn.slick.openal.AudioImpl#playAsMusic(float, float, boolean)
public int playAsSoundEffect(float pitch,
float gain,
boolean loop)
Audio
playAsSoundEffect in interface AudioplayAsSoundEffect in class AudioImplpitch - The pitch of the play backgain - The gain of the play backloop - True if we should loop
org.newdawn.slick.openal.AudioImpl#playAsSoundEffect(float, float, boolean)
public int playAsSoundEffect(float pitch,
float gain,
boolean loop,
float x,
float y,
float z,
float radius)
playAsSoundEffect in interface AudioplayAsSoundEffect in class AudioImplpitch - 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
org.newdawn.slick.openal.Audio#playAsSoundEffect(float, float, boolean, float, float, float)public void stop()
Audio
stop in interface Audiostop in class AudioImplorg.newdawn.slick.openal.AudioImpl#stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||