|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpaulscode.sound.SoundSystem
public class SoundSystem
The SoundSystem class is the core class for the SoundSystem library. It is
capable of interfacing with external sound library and codec library
pluggins. This core class is stripped down to give it a smaller memory
footprint and to make it more customizable. This library was created to
provide a simple, common interface to a variety of 3rd-party sound and codec
libraries, and to simplify switching between them on the fly. If no
external pluggins are loaded, this core class by itself is only capable of
playing MIDI files. Specific implementations (such as SoundSystemJPCT) will
extend this core class. They will automatically link with popular
external pluggins and provide extra methods for ease of use.
There should be only one instance of this class in any program! The
SoundSystem can be constructed by defining which sound library to use, or by
allowing SoundSystem to perform its own library compatibility checking. See
SoundSystemConfig for information
about changing default settings and linking with external pluggins.
SoundSystem License:
You are free to use this library for any purpose, commercial or otherwise.
You may modify this library or source code, and distribute it any way you
like, provided the following conditions are met:
1) You may not falsely claim to be the author of this library or any
unmodified portion of it.
2) You may not copyright this library or a modified version of it and then
sue me for copyright infringement.
3) If you modify the source code, you must clearly document the changes
made before redistributing the modified source code, so other users know
it is not the original code.
4) You are not required to give me credit for this library in any derived
work, but if you do, you must also mention my website:
http://www.paulscode.com
5) I the author will not be responsible for any damages (physical,
financial, or otherwise) caused by the use if this library or any part
of it.
6) I the author do not guarantee, warrant, or make any representations,
either expressed or implied, regarding the use of this library or any
part of it.
Author: Paul Lamb
http://www.paulscode.com
| Field Summary | |
|---|---|
protected java.lang.String |
className
Name of this class. |
protected java.util.List<CommandObject> |
commandQueue
List of queued commands to perform. |
protected CommandThread |
commandThread
Processes queued commands in the background. |
protected SoundSystemLogger |
logger
Processes status messages, warnings, and error messages. |
java.util.Random |
randomNumberGenerator
Generates random numbers. |
protected Library |
soundLibrary
Handle to the active sound library. |
| Constructor Summary | |
|---|---|
SoundSystem()
Constructor: Create the sound system using the default library. |
|
SoundSystem(java.lang.Class libraryClass)
Constructor: Create the sound system using the specified library. |
|
| Method Summary | |
|---|---|
void |
activate(java.lang.String sourcename)
Activates the specified source after it was culled, so it can be played again. |
void |
backgroundMusic(java.lang.String sourcename,
java.lang.String filename,
boolean toLoop)
Creates a new permanant, streaming, priority source with zero attenuation. |
void |
backgroundMusic(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
boolean toLoop)
Creates a new permanant, streaming, priority source with zero attenuation. |
void |
changeDopplerFactor(float dopplerFactor)
Changes the Doppler factor, for determining Doppler effect scale. |
void |
changeDopplerVelocity(float dopplerVelocity)
Changes the Doppler velocity, for use in Doppler effect. |
void |
checkFadeVolumes()
Makes sure the current volume levels of streaming sources and MIDI are correct. |
void |
cleanup()
Ends the command thread, shuts down the sound system, and removes references to all instantiated objects. |
boolean |
CommandQueue(CommandObject newCommand)
Queues a command. |
void |
cull(java.lang.String sourcename)
Culls the specified source. |
static java.lang.Class |
currentLibrary()
Returns the currently loaded library, or -1 if none. |
void |
dequeueSound(java.lang.String sourcename,
java.lang.String filename)
Removes the first occurrence of the specified filename/identifier from the specified source's list of sounds to play when previous playback ends. |
protected boolean |
errorCheck(boolean error,
java.lang.String message,
int indent)
Prints the specified message if error is true. |
protected void |
errorMessage(java.lang.String message,
int indent)
Prints an error message. |
void |
fadeOut(java.lang.String sourcename,
java.lang.String filename,
long milis)
Fades out the volume of whatever the specified source is currently playing, then begins playing the specified file at the source's previously assigned volume level. |
void |
fadeOut(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
long milis)
Fades out the volume of whatever the specified source is currently playing, then begins playing the specified file at the source's previously assigned volume level. |
void |
fadeOutIn(java.lang.String sourcename,
java.lang.String filename,
long milisOut,
long milisIn)
Fades out the volume of whatever the specified source is currently playing, then fades the volume back in playing the specified filename. |
void |
fadeOutIn(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
long milisOut,
long milisIn)
Fades out the volume of whatever the specified source is currently playing, then fades the volume back in playing the specified file. |
void |
feedRawAudioData(java.lang.String sourcename,
byte[] buffer)
Feeds raw data through the specified source. |
void |
flush(java.lang.String sourcename)
Flushes all previously queued audio data from a streaming source. |
static SoundSystemException |
getLastException()
Returns the last SoundSystemException thrown, or null if none. |
ListenerData |
getListenerData()
Method for obtaining information about the listener's position and orientation. |
float |
getMasterVolume()
Returns the overall volume, affecting all sources. |
float |
getPitch(java.lang.String sourcename)
Returns the pitch of the specified source. |
float |
getVolume(java.lang.String sourcename)
Returns the current volume of the specified source, or zero if the specified source was not found. |
protected void |
importantMessage(java.lang.String message,
int indent)
Prints an important message. |
protected void |
init(java.lang.Class libraryClass)
Loads the message logger, initializes the specified sound library, and starts the command thread. |
static boolean |
initialized()
Returns false if a sound library is busy initializing. |
void |
interruptCommandThread()
Wakes up the Command Thread to process commands. |
static boolean |
libraryCompatible(java.lang.Class libraryClass)
Checks if the specified library type is compatible. |
protected void |
linkDefaultLibrariesAndCodecs()
Links with any default libraries or codecs should be made in this method. |
void |
loadSound(byte[] data,
javax.sound.sampled.AudioFormat format,
java.lang.String identifier)
Saves raw PCM audio data in the specified audio format, under the specified identifier. |
void |
loadSound(java.lang.String filename)
Pre-loads a sound into memory. |
void |
loadSound(java.net.URL url,
java.lang.String identifier)
Pre-loads a sound specified by the given URL into memory. |
protected void |
ManageSources()
This method can be overridden by extended classes to be used for source management (culling and activating sources based on established rules). |
protected void |
message(java.lang.String message,
int indent)
Prints a message. |
float |
millisecondsPlayed(java.lang.String sourcename)
Returns the number of miliseconds since the specified source began playing. |
void |
moveListener(float x,
float y,
float z)
Moves the listener relative to the current location. |
boolean |
newLibrary(java.lang.Class libraryClass)
Switches to the specified library, loosing all sources. |
void |
newSource(boolean priority,
java.lang.String sourcename,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a new non-streaming source. |
void |
newSource(boolean priority,
java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a new non-streaming source. |
void |
newStreamingSource(boolean priority,
java.lang.String sourcename,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a new streaming source. |
void |
newStreamingSource(boolean priority,
java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a new streaming source. |
void |
pause(java.lang.String sourcename)
Pauses the specified source. |
void |
play(java.lang.String sourcename)
Plays the specified source. |
boolean |
playing()
Returns true if anything is currently playing. |
boolean |
playing(java.lang.String sourcename)
Returns true if the specified source is playing. |
void |
queueSound(java.lang.String sourcename,
java.lang.String filename)
If the specified source is a streaming source or MIDI source, this method queues up the next sound to play when the previous playback ends. |
void |
queueSound(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier)
If the specified source is a streaming source or MIDI source, this method queues up the next sound to play when the previous playback ends. |
java.lang.String |
quickPlay(boolean priority,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a temporary source and plays it. |
java.lang.String |
quickPlay(boolean priority,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a temporary source and plays it. |
java.lang.String |
quickStream(boolean priority,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a temporary source and streams it. |
java.lang.String |
quickStream(boolean priority,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
Creates a temporary source and streams it. |
void |
rawDataStream(javax.sound.sampled.AudioFormat audioFormat,
boolean priority,
java.lang.String sourcename,
float x,
float y,
float z,
int attModel,
float distOrRoll)
Opens a direct line for streaming audio data. |
void |
removeSource(java.lang.String sourcename)
Removes the specified source and clears up any memory it used. |
void |
removeTemporarySources()
Searches for and removes any temporary sources that have finished playing. |
void |
rewind(java.lang.String sourcename)
Rewinds the specified source. |
void |
setAttenuation(java.lang.String sourcename,
int model)
Changes a source's attenuation model. |
void |
setDistOrRoll(java.lang.String sourcename,
float dr)
Changes a source's fade distance or rolloff factor. |
static void |
setException(SoundSystemException e)
Stores a SoundSystemException which can be retreived later with the 'getLastException' method. |
void |
setListenerAngle(float angle)
Sets the listener's angle in radians around the y-axis. |
void |
setListenerOrientation(float lookX,
float lookY,
float lookZ,
float upX,
float upY,
float upZ)
Sets the listener's orientation. |
void |
setListenerPosition(float x,
float y,
float z)
Moves the listener to the specified location. |
void |
setListenerVelocity(float x,
float y,
float z)
Sets the listener's velocity, for use in Doppler effect. |
void |
setLooping(java.lang.String sourcename,
boolean lp)
Changes a source to looping or non-looping. |
void |
setMasterVolume(float value)
Sets the overall volume, affecting all sources. |
void |
setPitch(java.lang.String sourcename,
float value)
Manually sets the specified source's pitch. |
void |
setPosition(java.lang.String sourcename,
float x,
float y,
float z)
Move a source to the specified location. |
void |
setPriority(java.lang.String sourcename,
boolean pri)
Set a source's priority factor. |
void |
setTemporary(java.lang.String sourcename,
boolean temporary)
Sets a flag for a source indicating whether it should be used or if it should be removed after it finishes playing. |
void |
setVelocity(java.lang.String sourcename,
float x,
float y,
float z)
Sets the specified source's velocity, for use in Doppler effect. |
void |
setVolume(java.lang.String sourcename,
float value)
Manually sets the specified source's volume. |
protected static void |
snooze(long milliseconds)
Sleeps for the specified number of milliseconds. |
void |
stop(java.lang.String sourcename)
Stops the specified source. |
boolean |
switchLibrary(java.lang.Class libraryClass)
Switches to the specified library, and preserves all sources. |
void |
turnListener(float angle)
Turns the listener counterclockwise by "angle" radians around the y-axis, relative to the current angle. |
void |
unloadSound(java.lang.String filename)
Removes a pre-loaded sound from memory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SoundSystemLogger logger
protected Library soundLibrary
protected java.util.List<CommandObject> commandQueue
protected CommandThread commandThread
public java.util.Random randomNumberGenerator
protected java.lang.String className
| Constructor Detail |
|---|
public SoundSystem()
SoundSystemConfig for
information about sound library types.
public SoundSystem(java.lang.Class libraryClass)
throws SoundSystemException
libraryClass - Library to use.
See SoundSystemConfig for
information about chosing a sound library.
SoundSystemException| Method Detail |
|---|
protected void linkDefaultLibrariesAndCodecs()
SoundSystemConfig for
information about linking with sound libraries and codecs.
protected void init(java.lang.Class libraryClass)
throws SoundSystemException
libraryClass - Library to initialize.
See SoundSystemConfig for
information about chosing a sound library.
SoundSystemExceptionpublic void cleanup()
public void interruptCommandThread()
public void loadSound(java.lang.String filename)
filename - Filename of the sound file to load.
public void loadSound(java.net.URL url,
java.lang.String identifier)
url - URL handle to the sound file to load.identifier - Filename/identifier of the file referenced by the URL.
public void loadSound(byte[] data,
javax.sound.sampled.AudioFormat format,
java.lang.String identifier)
data - The sample dataformat - Format the sample data is stored inidentifier - What to call the sample.public void unloadSound(java.lang.String filename)
filename - Filename/identifier of the sound file to unload.
public void queueSound(java.lang.String sourcename,
java.lang.String filename)
sourcename - Source identifier.filename - Name of the sound file to play next.
public void queueSound(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier)
sourcename - Source identifier.url - URL handle to the sound file to load.identifier - Filename/identifier of the file referenced by the URL.
public void dequeueSound(java.lang.String sourcename,
java.lang.String filename)
sourcename - Source identifier.filename - Filename/identifier of the sound file to play next.
public void fadeOut(java.lang.String sourcename,
java.lang.String filename,
long milis)
sourcename - Name of the source to fade out.filename - Name of a sound file to play next, or null for none.milis - Number of miliseconds the fadeout should take.
public void fadeOut(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
long milis)
sourcename - Name of the source to fade out.url - URL handle to the sound file to play next, or null for none.identifier - Filename/identifier of the file referenced by the URL.milis - Number of miliseconds the fadeout should take.
public void fadeOutIn(java.lang.String sourcename,
java.lang.String filename,
long milisOut,
long milisIn)
sourcename - Name of the source to fade out/in.filename - Name of a sound file to play next, or null for none.milisOut - Number of miliseconds the fadeout should take.milisIn - Number of miliseconds the fadein should take.
public void fadeOutIn(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
long milisOut,
long milisIn)
sourcename - Name of the source to fade out/in.url - URL handle to the sound file to play next.identifier - Filename/identifier of the file referenced by the URL.milisOut - Number of miliseconds the fadeout should take.milisIn - Number of miliseconds the fadein should take.public void checkFadeVolumes()
public void backgroundMusic(java.lang.String sourcename,
java.lang.String filename,
boolean toLoop)
sourcename - A unique identifier for this source. Two sources may not use the same sourcename.filename - Filename of the sound file to stream at this source.toLoop - Should this source loop, or play only once.
public void backgroundMusic(java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
boolean toLoop)
sourcename - A unique identifier for this source. Two sources may not use the same sourcename.url - URL handle to the sound file to stream at this source.identifier - Filename/identifier of the file referenced by the URL.toLoop - Should this source loop, or play only once.
public void newSource(boolean priority,
java.lang.String sourcename,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
SoundSystemConfig for more
information about Attenuation, fade distance, and rolloff factor.
priority - Setting this to true will prevent other sounds from overriding this one.sourcename - A unique identifier for this source. Two sources may not use the same sourcename.filename - Filename/identifier of the sound file to play at this source.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public void newSource(boolean priority,
java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
SoundSystemConfig for more
information about Attenuation, fade distance, and rolloff factor.
priority - Setting this to true will prevent other sounds from overriding this one.sourcename - A unique identifier for this source. Two sources may not use the same sourcename.url - URL handle to the sound file to stream at this source.identifier - Filename/identifier of the file referenced by the URL.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public void newStreamingSource(boolean priority,
java.lang.String sourcename,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
priority - Setting this to true will prevent other sounds from overriding this one.sourcename - A unique identifier for this source. Two sources may not use the same sourcename.filename - The filename of the sound file to play at this source.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public void newStreamingSource(boolean priority,
java.lang.String sourcename,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
priority - Setting this to true will prevent other sounds from overriding this one.sourcename - A unique identifier for this source. Two sources may not use the same sourcename.url - URL handle to the sound file to stream at this source.identifier - Filename/identifier of the file referenced by the URL.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public void rawDataStream(javax.sound.sampled.AudioFormat audioFormat,
boolean priority,
java.lang.String sourcename,
float x,
float y,
float z,
int attModel,
float distOrRoll)
audioFormat - Format that the data will be in.priority - Setting this to true will prevent other sounds from overriding this one.sourcename - A unique identifier for this source. Two sources may not use the same sourcename.x - X position for this source.y - Y position for this source.z - Z position for this source.attModel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public java.lang.String quickPlay(boolean priority,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
priority - Setting this to true will prevent other sounds from overriding this one.filename - Filename/identifier of the sound file to play at this source.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public java.lang.String quickPlay(boolean priority,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
priority - Setting this to true will prevent other sounds from overriding this one.url - URL handle to the sound file to stream at this source.identifier - Filename/identifier of the file referenced by the URL.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public java.lang.String quickStream(boolean priority,
java.lang.String filename,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
priority - Setting this to true will prevent other sounds from overriding this one.filename - Filename of the sound file to stream at this source.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public java.lang.String quickStream(boolean priority,
java.net.URL url,
java.lang.String identifier,
boolean toLoop,
float x,
float y,
float z,
int attmodel,
float distOrRoll)
priority - Setting this to true will prevent other sounds from overriding this one.url - URL handle to the sound file to stream at this source.identifier - Filename/identifier of the file referenced by the URL.toLoop - Should this source loop, or play only once.x - X position for this source.y - Y position for this source.z - Z position for this source.attmodel - Attenuation model to use.distOrRoll - Either the fading distance or rolloff factor, depending on the value of "attmodel".
public void setPosition(java.lang.String sourcename,
float x,
float y,
float z)
sourcename - Identifier for the source.x - destination X coordinate.y - destination Y coordinate.z - destination Z coordinate.
public void setVolume(java.lang.String sourcename,
float value)
sourcename - Source to move.value - New volume, float value ( 0.0f - 1.0f ).public float getVolume(java.lang.String sourcename)
sourcename - Source to read volume from.
public void setPitch(java.lang.String sourcename,
float value)
sourcename - The source's name.value - A float value ( 0.5f - 2.0f ).public float getPitch(java.lang.String sourcename)
sourcename - The source's name.
public void setPriority(java.lang.String sourcename,
boolean pri)
sourcename - Identifier for the source.pri - Setting this to true makes this source a priority source.
public void setLooping(java.lang.String sourcename,
boolean lp)
sourcename - Identifier for the source.lp - This source should loop.
public void setAttenuation(java.lang.String sourcename,
int model)
SoundSystemConfig for more
information about Attenuation.
sourcename - Identifier for the source.model - Attenuation model to use.
public void setDistOrRoll(java.lang.String sourcename,
float dr)
SoundSystemConfig for more
information about fade distance and rolloff.
sourcename - Identifier for the source.dr - Either the fading distance or rolloff factor, depending on the attenuation model used.public void changeDopplerFactor(float dopplerFactor)
SoundSystemConfig for more
information about Doppler effect.
dopplerFactor - New value for Doppler factor.public void changeDopplerVelocity(float dopplerVelocity)
SoundSystemConfig for more
information about Doppler effect.
dopplerVelocity - New value for Doppler velocity.
public void setVelocity(java.lang.String sourcename,
float x,
float y,
float z)
SoundSystemConfig for more
information about Doppler effect.
sourcename - The source's name.x - Velocity along world x-axis.y - Velocity along world y-axis.z - Velocity along world z-axis.
public void setListenerVelocity(float x,
float y,
float z)
SoundSystemConfig for more
information about Doppler effect.
x - Velocity along world x-axis.y - Velocity along world y-axis.z - Velocity along world z-axis.public float millisecondsPlayed(java.lang.String sourcename)
public void feedRawAudioData(java.lang.String sourcename,
byte[] buffer)
sourcename - Name of the streaming source to play from.buffer - Byte buffer containing raw audio data to stream.public void play(java.lang.String sourcename)
sourcename - Identifier for the source.public void pause(java.lang.String sourcename)
sourcename - Identifier for the source.public void stop(java.lang.String sourcename)
sourcename - Identifier for the source.public void rewind(java.lang.String sourcename)
sourcename - Identifier for the source.public void flush(java.lang.String sourcename)
sourcename - Identifier for the source.public void cull(java.lang.String sourcename)
sourcename - Identifier for the source.public void activate(java.lang.String sourcename)
sourcename - Identifier for the source.
public void setTemporary(java.lang.String sourcename,
boolean temporary)
sourcename - Identifier for the source.temporary - True = temporary, False = permanant.public void removeSource(java.lang.String sourcename)
sourcename - Identifier for the source.
public void moveListener(float x,
float y,
float z)
x - X offset.y - Y offset.z - Z offset.
public void setListenerPosition(float x,
float y,
float z)
x - Destination X coordinate.y - Destination Y coordinate.z - Destination Z coordinate.public void turnListener(float angle)
angle - radian offset.public void setListenerAngle(float angle)
angle - radians.
public void setListenerOrientation(float lookX,
float lookY,
float lookZ,
float upX,
float upY,
float upZ)
lookX - X coordinate of the (normalized) look-at vector.lookY - Y coordinate of the (normalized) look-at vector.lookZ - Z coordinate of the (normalized) look-at vector.upX - X coordinate of the (normalized) up-direction vector.upY - Y coordinate of the (normalized) up-direction vector.upZ - Z coordinate of the (normalized) up-direction vector.public void setMasterVolume(float value)
value - New volume, float value ( 0.0f - 1.0f ).public float getMasterVolume()
public ListenerData getListenerData()
ListenerData object.
public boolean switchLibrary(java.lang.Class libraryClass)
throws SoundSystemException
libraryClass - Library to use.
SoundSystemConfig for
information about chosing a sound library.
SoundSystemException
public boolean newLibrary(java.lang.Class libraryClass)
throws SoundSystemException
libraryClass - Library to use.
See SoundSystemConfig for
information about chosing a sound library.
SoundSystemExceptionprotected void ManageSources()
public boolean CommandQueue(CommandObject newCommand)
CommandObject for more information
about commands.
newCommand - Command to queue, or null to execute commands.
public void removeTemporarySources()
public boolean playing(java.lang.String sourcename)
sourcename - Unique identifier of the source to check.
public boolean playing()
public static boolean libraryCompatible(java.lang.Class libraryClass)
libraryClass - Libary type to check.
public static java.lang.Class currentLibrary()
public static boolean initialized()
public static SoundSystemException getLastException()
public static void setException(SoundSystemException e)
e - Exception to store.protected static void snooze(long milliseconds)
protected void message(java.lang.String message,
int indent)
message - Message to print.indent - Number of tabs to indent the message.
protected void importantMessage(java.lang.String message,
int indent)
message - Message to print.indent - Number of tabs to indent the message.
protected boolean errorCheck(boolean error,
java.lang.String message,
int indent)
error - True or False.message - Message to print if error is true.indent - Number of tabs to indent the message.
protected void errorMessage(java.lang.String message,
int indent)
message - Message to print.indent - Number of tabs to indent the message.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||