Interface Audio
- 
- All Superinterfaces:
- java.lang.Comparable<NamedBean>,- NamedBean,- PropertyChangeProvider
 - All Known Subinterfaces:
- AudioBuffer,- AudioListener,- AudioSource
 - All Known Implementing Classes:
- AbstractAudio,- AbstractAudioBuffer,- AbstractAudioListener,- AbstractAudioSource,- JavaSoundAudioBuffer,- JavaSoundAudioListener,- JavaSoundAudioSource,- JoalAudioBuffer,- JoalAudioListener,- JoalAudioSource,- NullAudioBuffer,- NullAudioListener,- NullAudioSource
 
 public interface Audio extends NamedBean 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 will convert to and from the hardware 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 and address within that system. 
 
 This file is part of JMRI.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. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface jmri.NamedBeanNamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intATDefinition of Audio object orientation at vector codestatic charBUFFERDefinition of AudioBuffer NamedBean sub-type codestatic intCMD_BIND_BUFFERCommand to bind Buffer to Sourcestatic intCMD_FADE_INCommand to fade in and start playback of this Sourcestatic intCMD_FADE_OUTCommand to fade out and stop playback of this Sourcestatic intCMD_INIT_FACTORYCommand to initialise AudioFactorystatic intCMD_LOAD_SOUNDCommand to load the soundstatic intCMD_PAUSECommand to pause playback of this Source and retain the positionstatic intCMD_PAUSE_TOGGLECommand to pause or resume this Source from the current positionstatic intCMD_PLAYCommand to play this Source from the beginningstatic intCMD_PLAY_TOGGLECommand to start or stop this Source from the beginningstatic intCMD_QUEUE_BUFFERSCommand to queue Buffer to Sourcestatic intCMD_RESET_POSITIONCommand to reset the position of this Sourcestatic intCMD_RESUMECommand to resume playback of this Source from the current positionstatic intCMD_REWINDCommand to rewind this Source to the beginningstatic intCMD_STOPCommand to stop playing this Source and rewind to the startstatic intCMD_UNQUEUE_BUFFERSCommand to unqueue used Buffers from Sourcestatic doubleDECIMAL_PLACESNumber of decimal places for float values to be stored instatic intFADE_INFade state of Source when fading instatic intFADE_NONEFade state of Source when not fadingstatic intFADE_OUTFade state of Source when fading outstatic charLISTENERDefinition of AudioListener NamedBean sub-type codestatic floatMAX_DISTANCEMaximum distance for Audio objectsstatic charSOURCEDefinition of AudioSource NamedBean sub-type codestatic intSTATE_EMPTYState code for an AudioBuffer when emptystatic intSTATE_INITIALDefault state for any newly created Audio objectstatic intSTATE_LOADEDState code for an AudioBuffer when loadedstatic intSTATE_MOVINGState code for an AudioListener when movingstatic intSTATE_PLAYINGState code for an AudioSource when playingstatic intSTATE_POSITIONEDState code for an AudioListener when positionedstatic intSTATE_STOPPEDState code for an AudioSource when stoppedstatic intUPDefinition of Audio object orientation up vector code- 
Fields inherited from interface jmri.NamedBeanDISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description chargetSubType()An Audio object can represent one of a number of subtypes of object.voidstateChanged(int oldState)Method used to update the current state of the Audio object- 
Methods inherited from interface jmri.NamedBeanaddPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
 - 
Methods inherited from interface jmri.beans.PropertyChangeProvideraddPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
- 
 
- 
- 
- 
Field Detail- 
SOURCEstatic final char SOURCE Definition of AudioSource NamedBean sub-type code- See Also:
- Constant Field Values
 
 - 
BUFFERstatic final char BUFFER Definition of AudioBuffer NamedBean sub-type code- See Also:
- Constant Field Values
 
 - 
LISTENERstatic final char LISTENER Definition of AudioListener NamedBean sub-type code- See Also:
- Constant Field Values
 
 - 
ATstatic final int AT Definition of Audio object orientation at vector code- See Also:
- Constant Field Values
 
 - 
UPstatic final int UP Definition of Audio object orientation up vector code- See Also:
- Constant Field Values
 
 - 
STATE_INITIALstatic final int STATE_INITIAL Default state for any newly created Audio object- See Also:
- Constant Field Values
 
 - 
STATE_STOPPEDstatic final int STATE_STOPPED State code for an AudioSource when stopped- See Also:
- Constant Field Values
 
 - 
STATE_PLAYINGstatic final int STATE_PLAYING State code for an AudioSource when playing- See Also:
- Constant Field Values
 
 - 
STATE_EMPTYstatic final int STATE_EMPTY State code for an AudioBuffer when empty- See Also:
- Constant Field Values
 
 - 
STATE_LOADEDstatic final int STATE_LOADED State code for an AudioBuffer when loaded- See Also:
- Constant Field Values
 
 - 
STATE_POSITIONEDstatic final int STATE_POSITIONED State code for an AudioListener when positioned- See Also:
- Constant Field Values
 
 - 
STATE_MOVINGstatic final int STATE_MOVING State code for an AudioListener when moving- See Also:
- Constant Field Values
 
 - 
CMD_INIT_FACTORYstatic final int CMD_INIT_FACTORY Command to initialise AudioFactory- See Also:
- Constant Field Values
 
 - 
CMD_LOAD_SOUNDstatic final int CMD_LOAD_SOUND Command to load the sound- See Also:
- Constant Field Values
 
 - 
CMD_BIND_BUFFERstatic final int CMD_BIND_BUFFER Command to bind Buffer to Source- See Also:
- Constant Field Values
 
 - 
CMD_QUEUE_BUFFERSstatic final int CMD_QUEUE_BUFFERS Command to queue Buffer to Source- See Also:
- Constant Field Values
 
 - 
CMD_UNQUEUE_BUFFERSstatic final int CMD_UNQUEUE_BUFFERS Command to unqueue used Buffers from Source- See Also:
- Constant Field Values
 
 - 
CMD_PLAYstatic final int CMD_PLAY Command to play this Source from the beginning- See Also:
- Constant Field Values
 
 - 
CMD_STOPstatic final int CMD_STOP Command to stop playing this Source and rewind to the start- See Also:
- Constant Field Values
 
 - 
CMD_PLAY_TOGGLEstatic final int CMD_PLAY_TOGGLE Command to start or stop this Source from the beginning- See Also:
- Constant Field Values
 
 - 
CMD_PAUSEstatic final int CMD_PAUSE Command to pause playback of this Source and retain the position- See Also:
- Constant Field Values
 
 - 
CMD_RESUMEstatic final int CMD_RESUME Command to resume playback of this Source from the current position- See Also:
- Constant Field Values
 
 - 
CMD_PAUSE_TOGGLEstatic final int CMD_PAUSE_TOGGLE Command to pause or resume this Source from the current position- See Also:
- Constant Field Values
 
 - 
CMD_REWINDstatic final int CMD_REWIND Command to rewind this Source to the beginning- See Also:
- Constant Field Values
 
 - 
CMD_FADE_INstatic final int CMD_FADE_IN Command to fade in and start playback of this Source- See Also:
- Constant Field Values
 
 - 
CMD_FADE_OUTstatic final int CMD_FADE_OUT Command to fade out and stop playback of this Source- See Also:
- Constant Field Values
 
 - 
CMD_RESET_POSITIONstatic final int CMD_RESET_POSITION Command to reset the position of this Source- See Also:
- Constant Field Values
 
 - 
FADE_NONEstatic final int FADE_NONE Fade state of Source when not fading- See Also:
- Constant Field Values
 
 - 
FADE_OUTstatic final int FADE_OUT Fade state of Source when fading out- See Also:
- Constant Field Values
 
 - 
FADE_INstatic final int FADE_IN Fade state of Source when fading in- See Also:
- Constant Field Values
 
 - 
MAX_DISTANCEstatic final float MAX_DISTANCE Maximum distance for Audio objects- See Also:
- Constant Field Values
 
 - 
DECIMAL_PLACESstatic final double DECIMAL_PLACES Number of decimal places for float values to be stored in- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getSubTypechar getSubType() An Audio object can represent one of a number of subtypes of object.This method enables us to determine which of those subtypes this particular instance is and be able to process accordingly. Current supported subtypes are: - B = Buffer
- L = Listener
- S = Source
 - Returns:
- subType char
 
 - 
stateChangedvoid stateChanged(int oldState) Method used to update the current state of the Audio object- Parameters:
- oldState- the former state
 
 
- 
 
-