Class JavaSoundAudioListener
- All Implemented Interfaces:
Comparable<NamedBean>,Audio,PropertyChangeProvider,AudioListener,NamedBean
For now, no system-specific implementations are forseen - this will remain internal-only
For more information about the JavaSound API, visit http://java.sun.com/products/java-media/sound/
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 class jmri.jmrit.audio.AbstractAudioListener
AbstractAudioListener.AudioListenerMoveThreadNested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields 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_QUEUE_BUFFERS, CMD_RESET_POSITION, CMD_RESUME, CMD_REWIND, CMD_STOP, CMD_UNQUEUE_BUFFERS, 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, UPFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionJavaSoundAudioListener(String systemName) Constructor for new JavaSoundAudioListener with system nameJavaSoundAudioListener(String systemName, String userName) Constructor for new JavaSoundAudioListener with system name and user name -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangePosition(javax.vecmath.Vector3f pos) Method to change the current position of this sourceprotected voidcleanup()Abstract method that concrete classes will implement to perform necessary cleanup routines.voidsetGain(float gain) Set the gain of this AudioListener objectMethods inherited from class jmri.jmrit.audio.AbstractAudioListener
calculateCurrentPosition, doResetCurrentPosition, getCurrentOrientation, getCurrentPosition, getGain, getMetersPerUnit, getOrientation, getPosition, getSubType, getVelocity, resetCurrentPosition, setMetersPerUnit, setOrientation, setPosition, setPosition, setPosition, setVelocity, stateChangedMethods inherited from class jmri.implementation.AbstractAudio
dispose, getBeanType, getState, getUsageReport, roundDecimal, roundDecimal, setStateMethods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChangeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, 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, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
JavaSoundAudioListener
Constructor for new JavaSoundAudioListener with system name- Parameters:
systemName- AudioListener object system name (e.g. IAL)
-
JavaSoundAudioListener
Constructor for new JavaSoundAudioListener with system name and user name- Parameters:
systemName- AudioListener object system name (e.g. IAL)userName- AudioListener object user name
-
-
Method Details
-
changePosition
Description copied from class:AbstractAudioListenerMethod to change the current position of this source- Specified by:
changePositionin classAbstractAudioListener- Parameters:
pos- new position
-
setGain
Description copied from interface:AudioListenerSet the gain of this AudioListener objectApplicable 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
- Specified by:
setGainin interfaceAudioListener- Overrides:
setGainin classAbstractAudioListener- Parameters:
gain- new gain value - range 0.0f to 1.0f
-
cleanup
Description copied from class:AbstractAudioAbstract method that concrete classes will implement to perform necessary cleanup routines.This method is now included in dispose(). The caller can call dispose() to cleanup and deregister an audio object.
- Specified by:
cleanupin classAbstractAudio
-