|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Audio
Represent an Audio, 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 Audio 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 | |
|---|---|
static int |
AT
Definition of Audio object orientation at vector code |
static char |
BUFFER
Definition of AudioBuffer NamedBean sub-type code |
static int |
CMD_BIND_BUFFER
Command to bind Buffer to Source |
static int |
CMD_FADE_IN
Command to fade in and start playback of this Source |
static int |
CMD_FADE_OUT
Command to fade out and stop playback of this Source |
static int |
CMD_INIT_FACTORY
Command to initialise AudioFactory |
static int |
CMD_LOAD_SOUND
Command to load the sound |
static int |
CMD_PAUSE
Command to pause playback of this Source and retain the position |
static int |
CMD_PAUSE_TOGGLE
Command to pause or resume this Source from the current position |
static int |
CMD_PLAY
Command to play this Source from the beginning |
static int |
CMD_PLAY_TOGGLE
Command to start or stop this Source from the beginning |
static int |
CMD_RESET_POSITION
Command to reset the position of this Source |
static int |
CMD_RESUME
Command to resume playback of this Source from the current position |
static int |
CMD_REWIND
Command to rewind this Source to the beginning |
static int |
CMD_STOP
Command to stop playing this Source and rewind to the start |
static double |
DECIMAL_PLACES
Number of decimal places for float values to be stored in |
static int |
FADE_IN
Fade state of Source when fading in |
static int |
FADE_NONE
Fade state of Source when not fading |
static int |
FADE_OUT
Fade state of Source when fading out |
static char |
LISTENER
Definition of AudioListener NamedBean sub-type code |
static float |
MAX_DISTANCE
Maximum distance for Audio objects |
static char |
SOURCE
Definition of AudioSource NamedBean sub-type code |
static int |
STATE_EMPTY
State code for an AudioBuffer when empty |
static int |
STATE_INITIAL
Default state for any newly created Audio object |
static int |
STATE_LOADED
State code for an AudioBuffer when loaded |
static int |
STATE_MOVING
State code for an AudioListener when moving |
static int |
STATE_PLAYING
State code for an AudioSource when playing |
static int |
STATE_POSITIONED
State code for an AudioListener when positioned |
static int |
STATE_STOPPED
State code for an AudioSource when stopped |
static int |
UP
Definition of Audio object orientation up vector code |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Method Summary | |
|---|---|
char |
getSubType()
An Audio object can represent one of a number of subtypes of object. |
void |
stateChanged(int oldState)
Method used to update the current state of the Audio object |
| Field Detail |
|---|
static final char SOURCE
static final char BUFFER
static final char LISTENER
static final int AT
static final int UP
static final int STATE_INITIAL
static final int STATE_STOPPED
static final int STATE_PLAYING
static final int STATE_EMPTY
static final int STATE_LOADED
static final int STATE_POSITIONED
static final int STATE_MOVING
static final int CMD_INIT_FACTORY
static final int CMD_LOAD_SOUND
static final int CMD_BIND_BUFFER
static final int CMD_PLAY
static final int CMD_STOP
static final int CMD_PLAY_TOGGLE
static final int CMD_PAUSE
static final int CMD_RESUME
static final int CMD_PAUSE_TOGGLE
static final int CMD_REWIND
static final int CMD_FADE_IN
static final int CMD_FADE_OUT
static final int CMD_RESET_POSITION
static final int FADE_NONE
static final int FADE_OUT
static final int FADE_IN
static final float MAX_DISTANCE
static final double DECIMAL_PLACES
| Method Detail |
|---|
char getSubType()
This method enables us to determine which of those subtypes this particular instance is and be able to process accordingly.
Current supported subtypes are:
void stateChanged(int oldState)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||