|
GTGE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.golden.gamedev.engine.BaseAudioRenderer
com.golden.gamedev.engine.audio.MidiRenderer
public class MidiRenderer
Play midi sound (*.mid).
Note: Midi sound use soundbank that not delivered in JRE, only JDK can play
midi sound properly.
In order to play midi sound properly in JRE you must explicitly install
soundbank.
Download soundbank from java sun website
(
http://java.sun.com/products/java-media/sound/soundbanks.html)
and refer to the manual how to install it.
Field Summary |
---|
Fields inherited from class com.golden.gamedev.engine.BaseAudioRenderer |
---|
END_OF_SOUND, ERROR, PLAYING, status, STOPPED, volume |
Constructor Summary | |
---|---|
MidiRenderer()
Creates new midi audio renderer. |
Method Summary | |
---|---|
boolean |
isAvailable()
Returns true, if this audio renderer is available to use or false if this renderer is not available to use (failed to initialized). |
boolean |
isVolumeSupported()
Returns whether setting audio volume is supported or not. |
void |
meta(MetaMessage msg)
Notified when the sound has finished playing. |
protected void |
playSound(URL audiofile)
Plays sound with specified audio file. |
protected void |
replaySound(URL audiofile)
Replays last played sound. |
protected void |
setSoundVolume(float volume)
Sets audio sound volume. |
protected void |
stopSound()
Stops any playing sound. |
Methods inherited from class com.golden.gamedev.engine.BaseAudioRenderer |
---|
getAudioFile, getStatus, getVolume, isLoop, play, play, setLoop, setVolume, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MidiRenderer()
Method Detail |
---|
public boolean isAvailable()
BaseAudioRenderer
isAvailable
in class BaseAudioRenderer
protected void playSound(URL audiofile)
BaseAudioRenderer
playSound
in class BaseAudioRenderer
protected void replaySound(URL audiofile)
BaseAudioRenderer
replaySound
in class BaseAudioRenderer
protected void stopSound()
BaseAudioRenderer
stopSound
in class BaseAudioRenderer
public void meta(MetaMessage msg)
meta
in interface MetaEventListener
protected void setSoundVolume(float volume)
BaseAudioRenderer
setSoundVolume
in class BaseAudioRenderer
public boolean isVolumeSupported()
BaseAudioRenderer
isVolumeSupported
in class BaseAudioRenderer
|
GTGE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |