|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AudioListener
Represent an AudioListener, a place to store or control sound information.
The AbstractAudio class contains a basic implementation of the state and messaging code, and forms a useful start for a system-specific implementation. Specific implementations in the jmrix package, e.g. for LocoNet and NCE, will convert to and from the layout commands.
The states and names are Java Bean parameters, so that listeners can be registered to be notified of any changes.
Each AudioListener object has a two names. The "user" name is entirely free form, and can be used for any purpose. The "system" name is provided by the system-specific implementations, and provides a unique mapping to the layout control system (e.g. LocoNet, NCE, etc) and address within that system.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary |
|---|
| Fields inherited from interface jmri.Audio |
|---|
AT, BUFFER, CMD_BIND_BUFFER, CMD_FADE_IN, CMD_FADE_OUT, CMD_INIT_FACTORY, CMD_LOAD_SOUND, CMD_PAUSE, CMD_PAUSE_TOGGLE, CMD_PLAY, CMD_PLAY_TOGGLE, CMD_RESET_POSITION, CMD_RESUME, CMD_REWIND, CMD_STOP, DECIMAL_PLACES, FADE_IN, FADE_NONE, FADE_OUT, LISTENER, MAX_DISTANCE, SOURCE, STATE_EMPTY, STATE_INITIAL, STATE_LOADED, STATE_MOVING, STATE_PLAYING, STATE_POSITIONED, STATE_STOPPED, UP |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Method Summary | |
|---|---|
Vector3f |
getCurrentOrientation(int which)
Return the current orientation of this AudioListener object Applies only to sub-types: Listener |
Vector3f |
getCurrentPosition()
Returns the current position of this AudioListener object as a 3-dimensional vector. |
float |
getGain()
Return the current gain setting Applies only to sub-types: Listener Source |
float |
getMetersPerUnit()
Retrieve the current Meters per unit ratio to use for all distance calculations. |
Vector3f |
getOrientation(int which)
Return the orientation of this AudioListener object Applies only to sub-types: Listener |
Vector3f |
getPosition()
Returns the position of this AudioListener object as a 3-dimensional vector. |
Vector3f |
getVelocity()
Returns the velocity of this AudioListener object Applies only to sub-types: - Listener - Source |
void |
resetCurrentPosition()
Method to reset the current position of this AudioListener object to the initial position as defined by setPosition. |
void |
setGain(float gain)
Set the gain of this AudioListener object Applicable values 0.0f to 1.0f When applied to Listeners, has the effect of altering the master gain (or volume) Applies only to sub-types: Listener Source |
void |
setMetersPerUnit(float metersPerUnit)
Method to set the Meters per unit ratio for all distance calculations. |
void |
setOrientation(Vector3f at,
Vector3f up)
Set the orientation of this AudioListener object Applies only to sub-types: Listener |
void |
setPosition(float x,
float y)
Sets the position of this AudioListener object in x and y planes with z plane position fixed at zero Equivalent to setPosition(x, y, 0.0f) Applies only to sub-types: Listener Source |
void |
setPosition(float x,
float y,
float z)
Sets the position of this AudioListener object in x, y and z planes Applies only to sub-types: Listener Source |
void |
setPosition(Vector3f pos)
Sets the position of this AudioListener object Applies only to sub-types: Listener Source |
void |
setVelocity(Vector3f vel)
Sets the velocity of this AudioListener object Applies only to sub-types: Listener Source |
| Methods inherited from interface jmri.Audio |
|---|
getSubType, stateChanged |
| Method Detail |
|---|
void setPosition(Vector3f pos)
Applies only to sub-types:
pos - 3d position vector
void setPosition(float x,
float y,
float z)
Applies only to sub-types:
x - x-coordinatey - y-coordinatez - z-coordinate
void setPosition(float x,
float y)
Equivalent to setPosition(x, y, 0.0f)
Applies only to sub-types:
x - x-coordinatey - y-coordinateVector3f getPosition()
Applies only to sub-types:
Vector3f getCurrentPosition()
Applies only to sub-types:
void resetCurrentPosition()
Applies only to sub-types:
void setVelocity(Vector3f vel)
Applies only to sub-types:
vel - 3d velocity vectorVector3f getVelocity()
void setOrientation(Vector3f at,
Vector3f up)
Applies only to sub-types:
at - 3d vector representing the positionup - 3d vector representing the look-at pointVector3f getOrientation(int which)
Applies only to sub-types:
which - the orientation vector to return:
== AT - position;
== UP - look-at point
Vector3f getCurrentOrientation(int which)
Applies only to sub-types:
which - the orientation vector to return:
== AT - position;
== UP - look-at point
float getGain()
Applies only to sub-types:
void setGain(float gain)
Applicable values 0.0f to 1.0f
When applied to Listeners, has the effect of altering the master gain (or volume)
Applies only to sub-types:
gain - void setMetersPerUnit(float metersPerUnit)
Default value = 1.0f (i.e. 1 unit == 1 metre)
Typical alternative values:
Applies only to sub-types:
metersPerUnit - Meters per unit ratiofloat getMetersPerUnit()
Default value = 1.0f (i.e. 1 unit == 1 metre)
Typical alternative values:
Applies only to sub-types:
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||