|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.golden.gamedev.engine.BaseAudio
Field Summary | |
static int |
MULTIPLE
Multiple audio clips can be played at the same time. |
static int |
SINGLE
Audio clip with a same resource can only be played once at a time. |
static int |
SINGLE_REPLAY
Same as SINGLE except the audio clip is force to replay. |
Constructor Summary | |
BaseAudio(BaseIO base,
BaseAudioRenderer renderer)
|
Method Summary | |
BaseAudioRenderer |
getAudioRenderer(int slot)
|
BaseAudioRenderer |
getAudioRenderer(String audiofile)
|
BaseIO |
getBaseIO()
|
int |
getBuffer()
|
int |
getCountRenderers()
|
BaseAudioRenderer[] |
getRenderers()
|
float |
getVolume()
|
boolean |
isExclusive()
|
boolean |
isLoop()
|
int |
play(String audiofile)
Plays audio clip with MULTIPLE policy. |
int |
play(String audiofile,
int policy)
Plays an audio clip based on specified policy ( SINGLE , MULTIPLE , SINGLE_REPLAY ). |
void |
setBaseIO(BaseIO base)
|
void |
setBuffer(int i)
|
void |
setExclusive(boolean b)
|
void |
setLoop(boolean b)
|
void |
setVolume(float volume)
|
void |
stop(int slot)
|
void |
stop(String audiofile)
|
void |
stopAll()
|
void |
stopAll(BaseAudioRenderer except)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SINGLE
SINGLE_REPLAY
.
play(String, int)
,
Constant Field Valuespublic static final int MULTIPLE
exclusive mode
(only one audio clip playing),
MULTIPLE policy is obsolete, and automatically set to SINGLE
.
play(String, int)
,
setExclusive(boolean)
,
Constant Field Valuespublic static final int SINGLE_REPLAY
SINGLE
except the audio clip is force to replay.
play(String, int)
,
Constant Field ValuesConstructor Detail |
public BaseAudio(BaseIO base, BaseAudioRenderer renderer)
Method Detail |
public int play(String audiofile, int policy)
SINGLE
, MULTIPLE
, SINGLE_REPLAY
).
public int play(String audiofile)
MULTIPLE
policy.
public BaseAudioRenderer getAudioRenderer(int slot)
public BaseAudioRenderer getAudioRenderer(String audiofile)
public void stop(int slot)
public void stop(String audiofile)
public void stopAll()
public void stopAll(BaseAudioRenderer except)
public float getVolume()
public void setVolume(float volume)
public void setExclusive(boolean b)
public boolean isExclusive()
public BaseAudioRenderer[] getRenderers()
public int getCountRenderers()
public int getBuffer()
public void setBuffer(int i)
public boolean isLoop()
public void setLoop(boolean b)
public BaseIO getBaseIO()
public void setBaseIO(BaseIO base)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |