|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzombie.core.sound.Buffer
public class Buffer
A sound buffer, used for playing short sound effects from RAM.
Constructor Summary | |
---|---|
Buffer()
C'tor |
|
Buffer(java.lang.String url,
float gain,
float pitch,
int priority,
boolean looped)
C'tor. |
|
Buffer(java.lang.String url,
float gain,
float pitch,
int priority,
boolean looped,
Attenuator attenuator)
C'tor |
|
Buffer(java.lang.String url,
int priority)
C'tor. |
|
Buffer(java.lang.String url,
int priority,
boolean looped)
C'tor. |
Method Summary | |
---|---|
void |
create()
Create native resources, load and decode the Ogg data from the URL, and upload to AL. |
void |
destroy()
Destroy native resources. |
Attenuator |
getAttenuator()
Returns the Attenuator to use for this Sound. |
int |
getBufferID()
|
int |
getFormat()
|
float |
getGain()
Returns the gain. |
float |
getPitch()
Returns the pitch. |
int |
getPriority()
Returns the priority. |
java.lang.String |
getURL()
|
boolean |
isCreated()
|
boolean |
isLooped()
Returns looped status |
boolean |
isStereo()
|
void |
setAttenuator(Attenuator attenuator)
Sets the Attenuator to use for this Sound. |
void |
setGain(float gain)
Sets the default gain for this buffer |
void |
setLooped(boolean looped)
Sets whether this buffer should be looped by default |
void |
setPitch(float pitch)
Sets the default pitch for this buffer |
void |
setPriority(int priority)
Sets the default priority for this buffer relative to all other buffers. |
void |
setURL(java.lang.String url)
Sets the URL from where this AbstractSound will read Ogg Vorbis data |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Buffer()
public Buffer(java.lang.String url, int priority)
url
- priority
- public Buffer(java.lang.String url, int priority, boolean looped)
url
- priority
- looped
- public Buffer(java.lang.String url, float gain, float pitch, int priority, boolean looped)
url
- gain
- pitch
- priority
- looped
- public Buffer(java.lang.String url, float gain, float pitch, int priority, boolean looped, Attenuator attenuator)
url
- gain
- pitch
- priority
- looped
- attenuator
- Method Detail |
---|
public void create()
AL
has not
been created.
destroy()
public void destroy()
create()
has not yet been called.
create()
public boolean isCreated()
create()
has been calledpublic final int getBufferID()
public java.lang.String toString()
toString
in class java.lang.Object
public int getFormat()
public boolean isStereo()
public final void setGain(float gain)
Sound
setGain
in interface Sound
gain
- (must be ≥ 0.0f and ≤ 1.0f)public final void setPitch(float pitch)
Sound
setPitch
in interface Sound
pitch
- (must be > 0.0f)public final void setPriority(int priority)
Sound
setPriority
in interface Sound
priority
- (must be >= 0)public final void setLooped(boolean looped)
Sound
setLooped
in interface Sound
public final void setURL(java.lang.String url)
Sound
setURL
in interface Sound
url
- May ne nullpublic final float getGain()
Sound
getGain
in interface Sound
public final float getPitch()
Sound
getPitch
in interface Sound
public final int getPriority()
Sound
getPriority
in interface Sound
public final boolean isLooped()
Sound
isLooped
in interface Sound
public final java.lang.String getURL()
getURL
in interface Sound
public Attenuator getAttenuator()
Sound
Attenuator
to use for this Sound. The default Attenuator is specified by the SoundEngine
itself,
so if no attenuator has been set with Sound.setAttenuator(Attenuator)
then the default returned by
SoundEngine.getDefaultAttenuator()
will be used instead when playing the sound.
getAttenuator
in interface Sound
Sound.setAttenuator(Attenuator)
,
SoundEngine.getDefaultAttenuator()
public void setAttenuator(Attenuator attenuator)
Sound
Attenuator
to use for this Sound. If set to null, then the default attenuator as returned by
SoundEngine.getDefaultAttenuator()
will be used when playing this sound.
setAttenuator
in interface Sound
attenuator
- May be nullSound.getAttenuator()
,
SoundEngine.getDefaultAttenuator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |