|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Audio
Singleton service for playing audio clips.
Method Summary | |
---|---|
java.lang.String[] |
getSounds()
Obtains a list of all available sounds in system/user folders. |
void |
play(java.io.File ogg)
Plays the given audio file, which must be in .ogg format. |
void |
play(java.io.InputStream oggStream)
Plays audio from the given InputStream, which must be in .ogg format. |
void |
play(java.lang.String oggName)
Plays an audio file from the system or user 'sounds' folder, which must be in .ogg format. |
boolean |
soundExists(java.lang.String name)
Returns true if a sound with the given name currently exists. |
Method Detail |
---|
void play(java.lang.String oggName) throws AudioSetupException, GeneralException
oggName
- File to play (name only, e.g. "frogs" if you want to play
"frogs.ogg" in one of those folders)
AudioSetupException
- Current system doesn't support audio playback
GeneralException
- Any errorvoid play(java.io.File ogg) throws AudioSetupException, GeneralException
ogg
- File to play
AudioSetupException
- Current system doesn't support audio playback
GeneralException
- Any errorvoid play(java.io.InputStream oggStream) throws AudioSetupException, GeneralException
oggStream
- Stream to play
AudioSetupException
- Current system doesn't support audio playback
GeneralException
- Any errorjava.lang.String[] getSounds() throws GeneralException
play(String)
GeneralException
- Any errorboolean soundExists(java.lang.String name)
name
- Name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |