|
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.msjava4x.CSoundEngine
Implementation of sound engine for Microsoft JVM's that support DirectX interfacing.
Inner Class Summary | |
(package private) class |
CSoundEngine.CDXSound
DirectSound implementation of the sound object. |
Field Summary | |
private java.util.Vector |
m_createdMusics
All the music files created through this sound engine. |
private java.util.Vector |
m_createdSamples
All the sounds created through this sound engine. |
private gameframe.engines.msjava4x.DirectSound |
m_dSound
The DirectSound instance that is used to load the sounds. |
private java.awt.Component |
m_focusedComponent
The focused component that uses the sound engine. |
private java.lang.String |
m_strDataDirectory
Name of the directory that contains loaded sounds. |
Constructor Summary | |
CSoundEngine(java.awt.Component component)
Constructs a DirectSound implementation of the sound engine. |
Method Summary | |
(package private) void |
finalizationNotify(CMidiMusic music)
Removes the given MIDI music from the list of active MIDI musics. |
void |
finalize()
Releases the DirectSound COM objects and MIDI music objects. |
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 "DSound". |
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 fileName)
Load a sample in WAV format from the given file and return an abstract reference for the loaded sound. |
void |
setDataDirectory(java.lang.String strDirectoryName)
Sets the data directory wherefrom the sounds are loaded. |
(package private) void |
setFocusedComponent(java.awt.Component component)
Sets the new focused component if the application finalises the old graphics engine and creates a new one. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private gameframe.engines.msjava4x.DirectSound m_dSound
private java.util.Vector m_createdSamples
private java.util.Vector m_createdMusics
private java.lang.String m_strDataDirectory
private java.awt.Component m_focusedComponent
Constructor Detail |
public CSoundEngine(java.awt.Component component) throws java.lang.Exception
component
- The component that is the focus monitored window for this sound engine.Method Detail |
public void finalize()
finalize
in interface Finalizable
finalize
in class java.lang.Object
void setFocusedComponent(java.awt.Component component)
component
- The component that owns this sound engine.void finalizationNotify(CMidiMusic music)
music
- The MIDI music object to be removed.public java.lang.String getName()
getName
in interface SoundEngine
public java.lang.String getDescription()
getDescription
in interface SoundEngine
public Sample loadSample(java.lang.String fileName) throws java.io.FileNotFoundException, GameFrameException
loadSample
in interface SoundEngine
fileName
- 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)
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |