Package jmri.jmrit.audio
Class NullAudioSource
- java.lang.Object
- 
- jmri.implementation.AbstractNamedBean
- 
- jmri.implementation.AbstractAudio
- 
- jmri.jmrit.audio.AbstractAudioSource
- 
- jmri.jmrit.audio.NullAudioSource
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<NamedBean>,- Audio,- PropertyChangeProvider,- AudioSource,- NamedBean
 
 public class NullAudioSource extends AbstractAudioSource Null audio system implementation of the Audio Source sub-class.For now, no system-specific implementations are forseen - this will remain internal-only 
 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.AbstractAudioSourceAbstractAudioSource.AudioSourceFadeThread, AbstractAudioSource.AudioSourceMoveThread
 - 
Nested classes/interfaces inherited from interface jmri.NamedBeanNamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
 
- 
 - 
Field Summary- 
Fields inherited from class jmri.implementation.AbstractNamedBeanlistenerRefs, mSystemName, register
 - 
Fields inherited from interface jmri.AudioAT, 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, UP
 - 
Fields inherited from interface jmri.jmrit.audio.AudioSourceLOOP_CONTINUOUS, LOOP_NONE
 - 
Fields inherited from interface jmri.NamedBeanDISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
 
- 
 - 
Constructor SummaryConstructors Constructor Description NullAudioSource(java.lang.String systemName)Constructor for new NullAudioSource with system name.NullAudioSource(java.lang.String systemName, java.lang.String userName)Constructor for new NullAudioSource with system name and user name.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) booleanbindAudioBuffer(AudioBuffer audioBuffer)Binds this AudioSource with the specified AudioBuffer.protected voidcalculateGain()Calculate the gain of this AudioSource based on distance from listener and fade levels.protected voidchangePosition(javax.vecmath.Vector3f pos)Change the current position of this source.protected voidcleanup()Abstract method that concrete classes will implement to perform necessary cleanup routines.protected voiddoFadeIn()Fade in then play this AudioSource.protected voiddoFadeOut()Fade out then stop this AudioSource.protected voiddoPause()Stop playing the clip but retain the current position.protected voiddoPlay()Play the clip from the beginning.protected voiddoResume()Play the clip from the current position.protected voiddoRewind()Rewind clip to the beginning.protected voiddoStop()Stop playing the clip and rewind to the beginning.- 
Methods inherited from class jmri.jmrit.audio.AbstractAudioSourceattachSourcesToEffects, calculateCurrentPosition, calculateFades, calculateLoops, detachSourcesToEffects, doResetCurrentPosition, doTogglePause, doTogglePlay, fadeIn, fadeOut, getAssignedBuffer, getAssignedBufferName, getCurrentPosition, getDebugString, getFadeGain, getFadeIn, getFadeOut, getFading, getGain, getLastNumLoops, getMaximumDistance, getMaxLoops, getMinLoops, getNumLoops, getOffset, getPitch, getPosition, getQueuedBuffers, getReferenceDistance, getRollOffFactor, getSubType, getVelocity, isAudioAlive, isBound, isLooped, isPositionRelative, isQueued, numProcessedBuffers, numQueuedBuffers, pause, play, queueAudioBuffer, queueAudioBuffers, queueBuffer, queueBuffers, resetCurrentPosition, resume, rewind, setAssignedBuffer, setAssignedBuffer, setBound, setFadeIn, setFadeOut, setGain, setLooped, setMaximumDistance, setMaxLoops, setMinLoops, setOffset, setPitch, setPosition, setPosition, setPosition, setPositionRelative, setQueued, setReferenceDistance, setRollOffFactor, setVelocity, stateChanged, stop, togglePause, togglePlay, unqueueAudioBuffers, unqueueBuffers
 - 
Methods inherited from class jmri.implementation.AbstractAudiodispose, getBeanType, getState, getUsageReport, roundDecimal, roundDecimal, setState
 - 
Methods inherited from class jmri.implementation.AbstractNamedBeanaddPropertyChangeListener, 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, vetoableChange
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
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
 
- 
 
- 
- 
- 
Constructor Detail- 
NullAudioSourcepublic NullAudioSource(java.lang.String systemName) Constructor for new NullAudioSource with system name.- Parameters:
- systemName- AudioSource object system name (e.g. IAS1)
 
 - 
NullAudioSourcepublic NullAudioSource(java.lang.String systemName, java.lang.String userName) Constructor for new NullAudioSource with system name and user name.- Parameters:
- systemName- AudioSource object system name (e.g. IAS1)
- userName- AudioSource object user name
 
 
- 
 - 
Method Detail- 
bindAudioBufferboolean bindAudioBuffer(AudioBuffer audioBuffer) Description copied from class:AbstractAudioSourceBinds this AudioSource with the specified AudioBuffer.Applies only to sub-types: - Source
 - Specified by:
- bindAudioBufferin class- AbstractAudioSource
- Parameters:
- audioBuffer- The AudioBuffer to bind to this AudioSource
- Returns:
- true if successful
 
 - 
changePositionprotected void changePosition(javax.vecmath.Vector3f pos) Description copied from class:AbstractAudioSourceChange the current position of this source.- Specified by:
- changePositionin class- AbstractAudioSource
- Parameters:
- pos- new position
 
 - 
doPlayprotected void doPlay() Description copied from class:AbstractAudioSourcePlay the clip from the beginning. If looped, start looping.- Specified by:
- doPlayin class- AbstractAudioSource
 
 - 
doStopprotected void doStop() Description copied from class:AbstractAudioSourceStop playing the clip and rewind to the beginning.- Specified by:
- doStopin class- AbstractAudioSource
 
 - 
doPauseprotected void doPause() Description copied from class:AbstractAudioSourceStop playing the clip but retain the current position.- Specified by:
- doPausein class- AbstractAudioSource
 
 - 
doResumeprotected void doResume() Description copied from class:AbstractAudioSourcePlay the clip from the current position.- Specified by:
- doResumein class- AbstractAudioSource
 
 - 
doRewindprotected void doRewind() Description copied from class:AbstractAudioSourceRewind clip to the beginning.- Specified by:
- doRewindin class- AbstractAudioSource
 
 - 
doFadeInprotected void doFadeIn() Description copied from class:AbstractAudioSourceFade in then play this AudioSource.- Specified by:
- doFadeInin class- AbstractAudioSource
 
 - 
doFadeOutprotected void doFadeOut() Description copied from class:AbstractAudioSourceFade out then stop this AudioSource.- Specified by:
- doFadeOutin class- AbstractAudioSource
 
 - 
cleanupprotected void 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 class- AbstractAudio
 
 - 
calculateGainprotected void calculateGain() Description copied from class:AbstractAudioSourceCalculate the gain of this AudioSource based on distance from listener and fade levels.- Specified by:
- calculateGainin class- AbstractAudioSource
 
 
- 
 
-