|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.openal.AudioImpl
org.newdawn.slick.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 |
| 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)
Play this sound as a sound effect |
void |
stop()
Stop the sound effect |
| Methods inherited from class org.newdawn.slick.openal.AudioImpl |
|---|
getBufferID, getPosition, pauseMusic, restartMusic, setPosition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OGG
public static final int WAV
public static final int MOD
public static final int AIF
| 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 void load()
throws java.io.IOException
DeferredResource
load in interface DeferredResourcejava.io.IOException - Indicates a failure to load the resourceDeferredResource.load()public boolean isPlaying()
Audio
isPlaying in interface AudioisPlaying in class AudioImplAudioImpl.isPlaying()
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
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
AudioImpl.playAsSoundEffect(float, float, boolean)
public int playAsSoundEffect(float pitch,
float gain,
boolean loop,
float x,
float y,
float z)
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
Audio.playAsSoundEffect(float, float, boolean, float, float, float)public void stop()
Audio
stop in interface Audiostop in class AudioImplAudioImpl.stop()public java.lang.String getDescription()
DeferredResource
getDescription in interface DeferredResourceDeferredResource.getDescription()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||