Package com.ardor3d.audio
Class CommandObject
java.lang.Object
com.ardor3d.audio.CommandObject
The CommandObject class is used to store arguments in the SoundSystem's
Command Queue. Queued CommandObjects are then processed by the
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
CommandThread
. Commands are queued
and executed in the background, so it is unlikely that the user will ever
need to use this class.
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
Modifier and TypeFieldDescriptionstatic final int
Global identifier for the command to activate a source.boolean[]
Any boolean arguments required for a command.byte[]
Any buffer required for a command.static final int
Global identifier for the command to change the Doppler factor.static final int
Global identifier for the command to change the Doppler velocity.static final int
Global identifier for the command to check volume levels of fading sources.Class[]
Any Class arguments required for a command.int
Which command to execute.static final int
Global identifier for the command to cull a source.static final int
Global identifier for the command to dequeue a sound file.static final int
Global identifier for the command to fade-out transition a source.static final int
Global identifier for the command to fade-out/in transition a source.static final int
Global identifier for the command to play a source.float[]
Any float arguments required for a command.static final int
Global identifier for the command to flush all queued data.static final int
Global identifier for the command to initialize the current sound library.int[]
Any int arguments required for a command.static final int
Global identifier for the command to pre-load a sound file.static final int
Global identifier for the command to pre-load a sound file.long[]
Any long arguments required for a command.static final int
Global identifier for the command to move the listner.static final int
Global identifier for the command to create a new library.static final int
Global identifier for the command to create a new source.Object[]
Any Object arguments required for a command.static final int
Global identifier for the command to pause a source.static final int
Global identifier for the command to play a source.static final int
Global identifier for the command to queue a sound file.static final int
Global identifier for the command to create a source and immediately play it.static final int
Global identifier for the command to create a new raw data stream.static final int
Global identifier for the command to delete a source.static final int
Global identifier for the command to rewind a source.static final int
Global identifier for the command to set a source's attenuation model.static final int
Global identifier for the command to set a source's fade distance or rolloff factor.static final int
Global identifier for the command to set the listener's turn angle.static final int
Global identifier for the command to change the listener's orientation.static final int
Global identifier for the command to set the listener's position.static final int
Global identifier for the command to set a source's velocity.static final int
Global identifier for the command to tell a source whether or not to loop.static final int
Global identifier for the command to change the master volume.static final int
Global identifier for the command to change a source's pitch.static final int
Global identifier for the command to set a source's position in 3D space.static final int
Global identifier for the command to change a source's priority.static final int
Global identifier for the command to set a source as permanant or temporary.static final int
Global identifier for the command to set a source's velocity.static final int
Global identifier for the command to change a source's volume.static final int
Global identifier for the command to stop a source.String[]
Any String arguments required for a command.static final int
Global identifier for the command to turn the listener.static final int
Global identifier for the command to remove a sound file from memory. -
Constructor Summary
ConstructorDescriptionCommandObject
(int cmd) Constructor used to create a command which doesn't require any arguments.CommandObject
(int cmd, boolean b1, boolean b2, boolean b3, String s, Object o, float f1, float f2, float f3, int i, float f4) Constructor used to create a command which requires several arguments.CommandObject
(int cmd, boolean b1, boolean b2, boolean b3, String s, Object o, float f1, float f2, float f3, int i, float f4, boolean b4) Constructor used to create a command which requires several arguments.CommandObject
(int cmd, float f) Constructor used to create a command which requires one float argument.CommandObject
(int cmd, float f1, float f2, float f3) Constructor used to create a command which requires three float arguments.CommandObject
(int cmd, float f1, float f2, float f3, float f4, float f5, float f6) Constructor used to create a command which requires six float arguments.CommandObject
(int cmd, int i) Constructor used to create a command which requires one integer argument.CommandObject
(int cmd, Class<? extends Library> c) Constructor used to create a command which requires one Library Class argument.CommandObject
(int cmd, Object o) Constructor used to create a command which requires one Object argument.CommandObject
(int cmd, Object o, boolean b, String s, float f1, float f2, float f3, int i, float f4) Constructor used to create a command which requires several arguments.CommandObject
(int cmd, String s) Constructor used to create a command which requires one String argument.CommandObject
(int cmd, String s, boolean b) Constructor used to create a command which requires a String and a boolean as arguments.CommandObject
(int cmd, String s, byte[] buff) Constructor used to create a command which requires one String argument and one byte buffer argument.CommandObject
(int cmd, String s, float f) Constructor used to create a command which requires a String and a float as arguments.CommandObject
(int cmd, String s, float f1, float f2, float f3) Constructor used to create a command which a String and three float arguments.CommandObject
(int cmd, String s, int i) Constructor used to create a command which requires a String and an int as arguments.CommandObject
(int cmd, String s, Object o) Constructor used to create a command which requires one String argument and one Object argument.CommandObject
(int cmd, String s, Object o, long l) Constructor used to create a command which requires one String argument, one Object argument, and one long argument.CommandObject
(int cmd, String s, Object o, long l1, long l2) Constructor used to create a command which requires one String argument, one Object argument, and two long arguments.CommandObject
(int cmd, String s1, String s2) Constructor used to create a command which requires two String arguments. -
Method Summary
-
Field Details
-
INITIALIZE
public static final int INITIALIZEGlobal identifier for the command to initialize the current sound library.- See Also:
-
LOAD_SOUND
public static final int LOAD_SOUNDGlobal identifier for the command to pre-load a sound file.- See Also:
-
LOAD_DATA
public static final int LOAD_DATAGlobal identifier for the command to pre-load a sound file.- See Also:
-
UNLOAD_SOUND
public static final int UNLOAD_SOUNDGlobal identifier for the command to remove a sound file from memory.- See Also:
-
QUEUE_SOUND
public static final int QUEUE_SOUNDGlobal identifier for the command to queue a sound file.- See Also:
-
DEQUEUE_SOUND
public static final int DEQUEUE_SOUNDGlobal identifier for the command to dequeue a sound file.- See Also:
-
FADE_OUT
public static final int FADE_OUTGlobal identifier for the command to fade-out transition a source.- See Also:
-
FADE_OUT_IN
public static final int FADE_OUT_INGlobal identifier for the command to fade-out/in transition a source.- See Also:
-
CHECK_FADE_VOLUMES
public static final int CHECK_FADE_VOLUMESGlobal identifier for the command to check volume levels of fading sources.- See Also:
-
NEW_SOURCE
public static final int NEW_SOURCEGlobal identifier for the command to create a new source.- See Also:
-
RAW_DATA_STREAM
public static final int RAW_DATA_STREAMGlobal identifier for the command to create a new raw data stream.- See Also:
-
QUICK_PLAY
public static final int QUICK_PLAYGlobal identifier for the command to create a source and immediately play it.- See Also:
-
SET_POSITION
public static final int SET_POSITIONGlobal identifier for the command to set a source's position in 3D space.- See Also:
-
SET_VOLUME
public static final int SET_VOLUMEGlobal identifier for the command to change a source's volume.- See Also:
-
SET_PITCH
public static final int SET_PITCHGlobal identifier for the command to change a source's pitch.- See Also:
-
SET_PRIORITY
public static final int SET_PRIORITYGlobal identifier for the command to change a source's priority.- See Also:
-
SET_LOOPING
public static final int SET_LOOPINGGlobal identifier for the command to tell a source whether or not to loop.- See Also:
-
SET_ATTENUATION
public static final int SET_ATTENUATIONGlobal identifier for the command to set a source's attenuation model.- See Also:
-
SET_DIST_OR_ROLL
public static final int SET_DIST_OR_ROLLGlobal identifier for the command to set a source's fade distance or rolloff factor.- See Also:
-
CHANGE_DOPPLER_FACTOR
public static final int CHANGE_DOPPLER_FACTORGlobal identifier for the command to change the Doppler factor.- See Also:
-
CHANGE_DOPPLER_VELOCITY
public static final int CHANGE_DOPPLER_VELOCITYGlobal identifier for the command to change the Doppler velocity.- See Also:
-
SET_VELOCITY
public static final int SET_VELOCITYGlobal identifier for the command to set a source's velocity.- See Also:
-
SET_LISTENER_VELOCITY
public static final int SET_LISTENER_VELOCITYGlobal identifier for the command to set a source's velocity.- See Also:
-
PLAY
public static final int PLAYGlobal identifier for the command to play a source.- See Also:
-
FEED_RAW_AUDIO_DATA
public static final int FEED_RAW_AUDIO_DATAGlobal identifier for the command to play a source.- See Also:
-
PAUSE
public static final int PAUSEGlobal identifier for the command to pause a source.- See Also:
-
STOP
public static final int STOPGlobal identifier for the command to stop a source.- See Also:
-
REWIND
public static final int REWINDGlobal identifier for the command to rewind a source.- See Also:
-
FLUSH
public static final int FLUSHGlobal identifier for the command to flush all queued data.- See Also:
-
CULL
public static final int CULLGlobal identifier for the command to cull a source.- See Also:
-
ACTIVATE
public static final int ACTIVATEGlobal identifier for the command to activate a source.- See Also:
-
SET_TEMPORARY
public static final int SET_TEMPORARYGlobal identifier for the command to set a source as permanant or temporary.- See Also:
-
REMOVE_SOURCE
public static final int REMOVE_SOURCEGlobal identifier for the command to delete a source.- See Also:
-
MOVE_LISTENER
public static final int MOVE_LISTENERGlobal identifier for the command to move the listner.- See Also:
-
SET_LISTENER_POSITION
public static final int SET_LISTENER_POSITIONGlobal identifier for the command to set the listener's position.- See Also:
-
TURN_LISTENER
public static final int TURN_LISTENERGlobal identifier for the command to turn the listener.- See Also:
-
SET_LISTENER_ANGLE
public static final int SET_LISTENER_ANGLEGlobal identifier for the command to set the listener's turn angle.- See Also:
-
SET_LISTENER_ORIENTATION
public static final int SET_LISTENER_ORIENTATIONGlobal identifier for the command to change the listener's orientation.- See Also:
-
SET_MASTER_VOLUME
public static final int SET_MASTER_VOLUMEGlobal identifier for the command to change the master volume.- See Also:
-
NEW_LIBRARY
public static final int NEW_LIBRARYGlobal identifier for the command to create a new library.- See Also:
-
buffer
public byte[] bufferAny buffer required for a command. -
intArgs
public int[] intArgsAny int arguments required for a command. -
floatArgs
public float[] floatArgsAny float arguments required for a command. -
longArgs
public long[] longArgsAny long arguments required for a command. -
boolArgs
public boolean[] boolArgsAny boolean arguments required for a command. -
stringArgs
Any String arguments required for a command. -
classArgs
Any Class arguments required for a command. -
objectArgs
Any Object arguments required for a command. -
Command
public int CommandWhich command to execute.
-
-
Constructor Details
-
CommandObject
public CommandObject(int cmd) Constructor used to create a command which doesn't require any arguments.- Parameters:
cmd
- Which command to execute.
-
CommandObject
public CommandObject(int cmd, int i) Constructor used to create a command which requires one integer argument.- Parameters:
cmd
- Which command to execute.i
- The integer argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one Library Class argument.- Parameters:
cmd
- Which command to execute.c
- The Library Class argument needed to execute this command.
-
CommandObject
public CommandObject(int cmd, float f) Constructor used to create a command which requires one float argument.- Parameters:
cmd
- Which command to execute.f
- The float argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one String argument.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one Object argument.- Parameters:
cmd
- Which command to execute.o
- The Object argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one String argument and one Object argument.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.o
- The Object argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one String argument and one byte buffer argument.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.buff
- The byte buffer argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one String argument, one Object argument, and one long argument.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.o
- The Object argument needed to execute this command.l
- The long argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires one String argument, one Object argument, and two long arguments.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.o
- The Object argument needed to execute this command.l1
- The first long argument needed to execute this command.l2
- The second long argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires two String arguments.- Parameters:
cmd
- Which command to execute.s1
- The first String argument needed to execute this command.s2
- The second String argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires a String and an int as arguments.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.i
- The integer argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires a String and a float as arguments.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.f
- The float argument needed to execute this command.
-
CommandObject
Constructor used to create a command which requires a String and a boolean as arguments.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.b
- The boolean argument needed to execute this command.
-
CommandObject
public CommandObject(int cmd, float f1, float f2, float f3) Constructor used to create a command which requires three float arguments.- Parameters:
cmd
- Which command to execute.f1
- The first float argument needed to execute this command.f2
- The second float argument needed to execute this command.f3
- The third float argument needed to execute this command.
-
CommandObject
Constructor used to create a command which a String and three float arguments.- Parameters:
cmd
- Which command to execute.s
- The String argument needed to execute this command.f1
- The first float argument needed to execute this command.f2
- The second float argument needed to execute this command.f3
- The third float argument needed to execute this command.
-
CommandObject
public CommandObject(int cmd, float f1, float f2, float f3, float f4, float f5, float f6) Constructor used to create a command which requires six float arguments.- Parameters:
cmd
- Which command to execute.f1
- The first float argument needed to execute this command.f2
- The second float argument needed to execute this command.f3
- The third float argument needed to execute this command.f4
- The fourth float argument needed to execute this command.f5
- The fifth float argument needed to execute this command.f6
- The sixth float argument needed to execute this command.
-
CommandObject
public CommandObject(int cmd, boolean b1, boolean b2, boolean b3, String s, Object o, float f1, float f2, float f3, int i, float f4) Constructor used to create a command which requires several arguments.- Parameters:
cmd
- Which command to execute.b1
- The first boolean argument needed to execute this command.b2
- The second boolean argument needed to execute this command.b3
- The third boolean argument needed to execute this command.s
- The String argument needed to execute this command.o
- The Object argument needed to execute this command.f1
- The first float argument needed to execute this command.f2
- The second float argument needed to execute this command.f3
- The third float argument needed to execute this command.i
- The integer argument needed to execute this command.f4
- The fourth float argument needed to execute this command.
-
CommandObject
public CommandObject(int cmd, boolean b1, boolean b2, boolean b3, String s, Object o, float f1, float f2, float f3, int i, float f4, boolean b4) Constructor used to create a command which requires several arguments.- Parameters:
cmd
- Which command to execute.b1
- The first boolean argument needed to execute this command.b2
- The second boolean argument needed to execute this command.b3
- The third boolean argument needed to execute this command.s
- The String argument needed to execute this command.o
- The Object argument needed to execute this command.f1
- The first float argument needed to execute this command.f2
- The second float argument needed to execute this command.f3
- The third float argument needed to execute this command.i
- The integer argument needed to execute this command.f4
- The fourth float argument needed to execute this command.b4
- The fourth boolean argument needed to execute this command.
-
CommandObject
public CommandObject(int cmd, Object o, boolean b, String s, float f1, float f2, float f3, int i, float f4) Constructor used to create a command which requires several arguments.- Parameters:
cmd
- Which command to execute.o
- The Object argument needed to execute this command.b
- The first boolean argument needed to execute this command.s
- The String argument needed to execute this command.f1
- The first float argument needed to execute this command.f2
- The second float argument needed to execute this command.f3
- The third float argument needed to execute this command.i
- The integer argument needed to execute this command.f4
- The fourth float argument needed to execute this command.
-