|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.PingOO.DLAI.lib.util.Manager
|
+--org.PingOO.DLAI.lib.util.SoundManager
Manages the sounds for the DLAI
| Field Summary | |
private static java.lang.String |
DEFAULT_MODULE
Default module. |
private static java.lang.String[] |
SOUND_EXTENSION
By default all audio clips are au files. |
private static java.util.Hashtable |
SOUND_TABLE
Cache for sounds. |
| Fields inherited from class org.PingOO.DLAI.lib.util.Manager |
classLoader |
| Constructor Summary | |
private |
SoundManager()
Hides the constructor from the outside. |
| Method Summary | |
static void |
clearCache()
Clears the cache used in this manager. |
private static java.applet.AudioClip |
findAudioClip(java.lang.String baseDirectory,
java.lang.String module,
java.lang.String fileName,
java.lang.String extension)
Returns an audio clip from a file. |
private static java.util.Hashtable |
getCache(java.lang.String module,
java.util.Hashtable parentTable)
Return the correct cache. |
static java.applet.AudioClip |
getSound(java.lang.String identifier)
Returns a audio clip from the default set. |
static java.applet.AudioClip |
getSound(java.lang.String module,
java.lang.String identifier)
Returns an audio clip from a different set. |
private static void |
initialize()
Initializes caches. |
protected static java.applet.AudioClip |
loadAudioClip(java.lang.String baseDirectory,
java.lang.String module,
java.lang.String fileName)
Tries to find an audio clip scanning various file extension. |
| Methods inherited from class org.PingOO.DLAI.lib.util.Manager |
findFile,
findFile,
findFile,
findFile |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final java.lang.String[] SOUND_EXTENSION
private static java.util.Hashtable SOUND_TABLE
private static final java.lang.String DEFAULT_MODULE
| Constructor Detail |
private SoundManager()
| Method Detail |
private static final void initialize()
private static final java.util.Hashtable getCache(java.lang.String module,
java.util.Hashtable parentTable)
module - The module to use.parentTable - The parent cache of the desired cache.public static void clearCache()
public static final java.applet.AudioClip getSound(java.lang.String identifier)
identifier - The identifier need to get the audio clip from its file. You do not need to provide the .au extension.null if the file was not found.
public static final java.applet.AudioClip getSound(java.lang.String module,
java.lang.String identifier)
module - The appli's name.identifier - The identifier need to get the audio clip from its file. You do not need to provide the .au extension.null if the file was not found.
protected static final java.applet.AudioClip loadAudioClip(java.lang.String baseDirectory,
java.lang.String module,
java.lang.String fileName)
baseDirectory - The sound directory..module - The appli's name.fileName - The name of the audioClip's file.null if the file was not found.
private static java.applet.AudioClip findAudioClip(java.lang.String baseDirectory,
java.lang.String module,
java.lang.String fileName,
java.lang.String extension)
baseDirectory - The sound directory..module - The appli's name.fileName - The name of the audio clip's file.extension - One of the existing extension for this file.null if the file was not found.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||