|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.engines.jdk11x.CSoundEngine
Java 1.1 implementation of the sound engine. Uses the well known "hack" to play samples on plain vanilla Java 1.1 platforms without Java Media Framework. Loads mono/stereo Microsoft PCM RIFF WAVE files.
Inner Class Summary | |
(package private) class |
CSoundEngine.CJava11Sound
Implementation of Sample that implements the sound playing in an "hacked" Java 1.1 way. |
Field Summary | |
private java.util.Vector |
m_createdSounds
All the sounds created through this sound engine. |
private java.lang.String |
m_strDataDirectory
Name of the directory that contains loaded sounds. |
Constructor Summary | |
CSoundEngine()
Constructs a JDK 1.1.x sound engine. |
Method Summary | |
void |
finalize()
Finalises all sounds. |
java.lang.String |
getDataDirectory()
Returns the data directory wherefrom the sounds are loaded. |
java.lang.String |
getDescription()
Returns the (possibly multiline) description of the implementation. |
java.lang.String |
getName()
Returns the short name (max 8 characters) of the implementation "Java11". |
Music |
loadMusic(java.lang.String fileName)
First tries to load a music file as streamed Microsoft RIFF WAV file, if no such file is found from the current data directory, tries to load a music file in MIDI format. |
Sample |
loadSample(java.lang.String strFileName)
Loads an mono 8-bit 11025 bytes/sec AU formatted sample from the given file name and return an abstract reference for the loaded sound. |
void |
setDataDirectory(java.lang.String strDirectoryName)
Sets the data directory wherefrom the sounds are loaded. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Vector m_createdSounds
private java.lang.String m_strDataDirectory
Constructor Detail |
public CSoundEngine()
Method Detail |
public Sample loadSample(java.lang.String strFileName) throws java.io.FileNotFoundException, GameFrameException
loadSample
in interface SoundEngine
strFileName
- The name of the file to be loaded (without the file extension)public Music loadMusic(java.lang.String fileName) throws java.io.FileNotFoundException, GameFrameException
loadMusic
in interface SoundEngine
fileName
- The name of the file to be loaded (without the file extension)setDataDirectory(java.lang.String)
public void setDataDirectory(java.lang.String strDirectoryName) throws java.io.FileNotFoundException
setDataDirectory
in interface SoundEngine
strDirectoryName
- The name of the directory that contains the sounds.public java.lang.String getDataDirectory()
getDataDirectory
in interface SoundEngine
loadSample(java.lang.String)
,
loadMusic(java.lang.String)
public void finalize()
finalize
in interface Finalizable
finalize
in class java.lang.Object
public java.lang.String getName()
getName
in interface SoundEngine
public java.lang.String getDescription()
getDescription
in interface SoundEngine
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |