Class AbstractAudioSource
- All Implemented Interfaces:
Comparable<NamedBean>,Audio,PropertyChangeProvider,AudioSource,NamedBean
- Direct Known Subclasses:
JavaSoundAudioSource,JoalAudioSource,NullAudioSource
Specific implementations will extend this base class.
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 ClassesModifier and TypeClassDescriptionprotected static classAn internal class used to create a new thread to monitor and maintain fade in and fade out levels.protected static classAn internal class used to create a new thread to monitor and maintain current source position with respect to velocity.Nested 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.jmrit.audio.AudioSource
LOOP_CONTINUOUS, LOOP_NONEFields 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
ConstructorsConstructorDescriptionAbstractAudioSource(String systemName) Abstract constructor for new AudioSource with system nameAbstractAudioSource(String systemName, String userName) Abstract constructor for new AudioSource with system name and user name -
Method Summary
Modifier and TypeMethodDescriptionintMethod to attach sources to effects(package private) abstract booleanbindAudioBuffer(AudioBuffer buffer) Binds this AudioSource with the specified AudioBuffer.protected voidCalculate current position based on velocity.protected voidCalculate the fade gains.protected abstract voidCalculate the gain of this AudioSource based on distance from listener and fade levels.protected voidCalculate the number of times to loop playback of this sound.protected abstract voidchangePosition(javax.vecmath.Vector3f pos) Change the current position of this source.intMethod to detach sources to effectsprotected abstract voiddoFadeIn()Fade in then play this AudioSource.protected abstract voidFade out then stop this AudioSource.protected abstract voiddoPause()Stop playing the clip but retain the current position.protected abstract voiddoPlay()Play the clip from the beginning.protected voidReset the current position.protected abstract voiddoResume()Play the clip from the current position.protected abstract voiddoRewind()Rewind clip to the beginning.protected abstract voiddoStop()Stop playing the clip and rewind to the beginning.protected voidToggle the current playing status.protected voidToggle the current playing status.voidfadeIn()Method to fade in and then play this AudioSource ObjectvoidfadeOut()Method to fade out and then stop this AudioSource Object only when it is already playing.Returns linked AudioBuffer objectReturn system name of linked AudioBuffer objectjavax.vecmath.Vector3fReturns the current position of this AudioSource object as a 3-dimensional vector.Get debug info about this audio source.protected floatUsed to return the current calculated fade gain for this AudioSource.intRetrieve the length of time in milliseconds to fade this source inintRetrieve the length of time in milliseconds to fade this source inprotected intGet the current fading status.floatgetGain()Return the currently stored gain settingintGet the last value returned byAudioSource.getNumLoops()floatReturn the current maximum distance setting.intReturns the maximum number of times that this AudioSource will loop, or LOOP_CONTINUOUS for infinite looping.intReturns the minimum number of times that this AudioSource will loop, or LOOP_CONTINUOUS for infinite looping.intThe number of times that this AudioSource should loop, or LOOP_CONTINUOUS for infinite looping.longReturn the offset in which to start playback of this AudioSource.floatgetPitch()Return the current pitch settingjavax.vecmath.Vector3fReturns the position of this AudioSource object as a 3-dimensional vector.floatReturn the current reference distance settingfloatGet the roll-off factor of this AudioSource object.charAn Audio object can represent one of a number of subtypes of object.javax.vecmath.Vector3fReturns the velocity of this AudioSource objectbooleanbooleanisBound()Method to return if this AudioSource has been bound to an AudioBufferbooleanisLooped()Check if this AudioSource object will loop or not.booleanReturns a boolean value that determines if the position of this AudioSource object is relative to the position of the AudioListener object or absolute.booleanisQueued()Method to return if this AudioSource has AudioBuffers queued to itintintvoidpause()Method to pause playing this AudioSource Objectvoidplay()Method to start playing this AudioSource ObjectbooleanqueueAudioBuffer(AudioBuffer audioBuffer) booleanqueueAudioBuffers(Queue<AudioBuffer> audioBuffers) booleanqueueBuffer(AudioBuffer audioBuffer) booleanqueueBuffers(Queue<AudioBuffer> audioBuffers) Queues the linked AudioBuffer object to this Source's buffer queuevoidMethod to reset the current position of this AudioSource object to the initial position as defined by setPosition.voidresume()Method to resume playing this AudioSource Objectvoidrewind()Method to rewind this AudioSource ObjectvoidsetAssignedBuffer(String bufferSystemName) Sets the system name of the linked AudioBuffer objectvoidsetAssignedBuffer(AudioBuffer audioBuffer) Sets the linked AudioBuffer objectprotected voidsetBound(boolean bound) Method to define if this AudioSource has been bound to an AudioBuffer.voidsetFadeIn(int fadeInTime) Set the length of time in milliseconds to fade this source invoidsetFadeOut(int fadeOutTime) Set the length of time in milliseconds to fade this source invoidsetGain(float gain) Set the gain of this AudioSource objectvoidsetLooped(boolean loop) Sets this AudioSource object to loop infinitely or not.voidsetMaximumDistance(float maximumDistance) Set the current maximum distance setting.voidsetMaxLoops(int loops) The maximum number of times that this AudioSource should loop.voidsetMinLoops(int loops) The minimum number of times that this AudioSource should loop.voidsetOffset(long offset) Set the offset in which to start playback of this AudioSource.voidsetPitch(float pitch) Set the pitch of this AudioSource objectvoidsetPosition(float x, float y) Sets the position of this AudioSource object in x and y planes with z plane position fixed at zerovoidsetPosition(float x, float y, float z) Sets the position of this AudioSource object in x, y and z planesvoidsetPosition(javax.vecmath.Vector3f pos) Sets the position of this AudioSource objectvoidsetPositionRelative(boolean relative) Sets the position of this AudioSource object to be relative to the position of the AudioListener object or absolute.protected voidsetQueued(boolean queued) voidsetReferenceDistance(float referenceDistance) Set the reference distance of this AudioSource object.voidsetRollOffFactor(float rollOffFactor) Set the roll-off factor of this AudioSource object.voidsetVelocity(javax.vecmath.Vector3f vel) Sets the velocity of this AudioSource objectvoidstateChanged(int oldState) Method used to update the current state of the Audio objectvoidstop()Method to stop playing this AudioSource ObjectvoidMethod to toggle playback of this AudioSource Object retaining postitionvoidMethod to toggle playback of this AudioSource Object reseting positionbooleanbooleanMethods inherited from class jmri.implementation.AbstractAudio
cleanup, 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
-
AbstractAudioSource
Abstract constructor for new AudioSource with system name- Parameters:
systemName- AudioSource object system name (e.g. IAS1)
-
AbstractAudioSource
Abstract constructor for new AudioSource with system name and user name- Parameters:
systemName- AudioSource object system name (e.g. IAS1)userName- AudioSource object user name
-
-
Method Details
-
isAudioAlive
-
getSubType
Description copied from interface:AudioAn 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
- Specified by:
getSubTypein interfaceAudio- Returns:
- subType char
-
queueBuffers
Description copied from interface:AudioSourceQueues the linked AudioBuffer object to this Source's buffer queueApplies only to sub-types:
- Source
- Specified by:
queueBuffersin interfaceAudioSource- Parameters:
audioBuffers- the AudioBuffer object to enqueue to this AudioSource- Returns:
- true if successfully queued audioBuffers; false otherwise
-
queueBuffer
- Specified by:
queueBufferin interfaceAudioSource
-
unqueueBuffers
- Specified by:
unqueueBuffersin interfaceAudioSource
-
getQueuedBuffers
-
setAssignedBuffer
Description copied from interface:AudioSourceSets the linked AudioBuffer objectApplies only to sub-types:
- Source
- Specified by:
setAssignedBufferin interfaceAudioSource- Parameters:
audioBuffer- the AudioBuffer object to bind to this AudioSource
-
setAssignedBuffer
Description copied from interface:AudioSourceSets the system name of the linked AudioBuffer objectApplies only to sub-types:
- Source
- Specified by:
setAssignedBufferin interfaceAudioSource- Parameters:
bufferSystemName- the SystemName of the AudioBuffer (i.e. IAB1) to bind to this AudioSource
-
getAssignedBuffer
Description copied from interface:AudioSourceReturns linked AudioBuffer objectApplies only to sub-types:
- Source
- Specified by:
getAssignedBufferin interfaceAudioSource- Returns:
- AudioBuffer the AudioBuffer object bound to this AudioSource
-
getAssignedBufferName
Description copied from interface:AudioSourceReturn system name of linked AudioBuffer objectApplies only to sub-types:
- Source
- Specified by:
getAssignedBufferNamein interfaceAudioSource- Returns:
- sysName the SystemName of the AudioBuffer bound to this AudioSource
-
setPosition
Description copied from interface:AudioSourceSets the position of this AudioSource objectApplies only to sub-types:
- Listener
- Source
- Specified by:
setPositionin interfaceAudioSource- Parameters:
pos- 3d position vector
-
setPosition
Description copied from interface:AudioSourceSets the position of this AudioSource object in x, y and z planesApplies only to sub-types:
- Listener
- Source
- Specified by:
setPositionin interfaceAudioSource- Parameters:
x- x-coordinatey- y-coordinatez- z-coordinate
-
setPosition
Description copied from interface:AudioSourceSets the position of this AudioSource object in x and y planes with z plane position fixed at zeroEquivalent to setPosition(x, y, 0.0f)
Applies only to sub-types:
- Listener
- Source
- Specified by:
setPositionin interfaceAudioSource- Parameters:
x- x-coordinatey- y-coordinate
-
getPosition
Description copied from interface:AudioSourceReturns the position of this AudioSource object as a 3-dimensional vector.Applies only to sub-types:
- Listener
- Source
- Specified by:
getPositionin interfaceAudioSource- Returns:
- 3d position vector
-
getCurrentPosition
Description copied from interface:AudioSourceReturns the current position of this AudioSource object as a 3-dimensional vector.Applies only to sub-types:
- Listener
- Source
- Specified by:
getCurrentPositionin interfaceAudioSource- Returns:
- 3d position vector
-
setPositionRelative
Description copied from interface:AudioSourceSets the position of this AudioSource object to be relative to the position of the AudioListener object or absolute.Applies only to sub-types:
- Source
- Specified by:
setPositionRelativein interfaceAudioSource- Parameters:
relative- position relative or absolute
-
isPositionRelative
Description copied from interface:AudioSourceReturns a boolean value that determines if the position of this AudioSource object is relative to the position of the AudioListener object or absolute.Applies only to sub-types:
- Source
- Specified by:
isPositionRelativein interfaceAudioSource- Returns:
- boolean position relative
-
setVelocity
Description copied from interface:AudioSourceSets the velocity of this AudioSource objectApplies only to sub-types:
- Listener
- Source
- Specified by:
setVelocityin interfaceAudioSource- Parameters:
vel- 3d velocity vector
-
getVelocity
Description copied from interface:AudioSourceReturns the velocity of this AudioSource objectApplies only to sub-types:
- Listener
- Source
- Specified by:
getVelocityin interfaceAudioSource- Returns:
- 3d velocity vector
-
calculateCurrentPosition
Calculate current position based on velocity. -
resetCurrentPosition
Description copied from interface:AudioSourceMethod to reset the current position of this AudioSource object to the initial position as defined by setPosition.Applies only to sub-types:
- Listener
- Source
- Specified by:
resetCurrentPositionin interfaceAudioSource
-
doResetCurrentPosition
Reset the current position. -
changePosition
Change the current position of this source.- Parameters:
pos- new position
-
setGain
Description copied from interface:AudioSourceSet the gain of this AudioSource objectDefault value = 1.0f
Applies only to sub-types:
- Listener
- Source
- Specified by:
setGainin interfaceAudioSource- Parameters:
gain- the gain of this AudioSource
-
getGain
Description copied from interface:AudioSourceReturn the currently stored gain settingDefault value = 1.0f
Applies only to sub-types:
- Listener
- Source
- Specified by:
getGainin interfaceAudioSource- Returns:
- gain setting of this AudioSource
-
calculateGain
Calculate the gain of this AudioSource based on distance from listener and fade levels. -
setPitch
Description copied from interface:AudioSourceSet the pitch of this AudioSource objectValues are restricted from 0.5f to 2.0f, i.e. half to double
Default value = 1.0f
Applies only to sub-types:
- Source
- Specified by:
setPitchin interfaceAudioSource- Parameters:
pitch- the pitch of this AudioSource
-
getPitch
Description copied from interface:AudioSourceReturn the current pitch settingValues are restricted from 0.5f to 2.0f, i.e. half to double
Default value = 1.0f
Applies only to sub-types:
- Source
- Specified by:
getPitchin interfaceAudioSource- Returns:
- pitch of this AudioSource
-
setReferenceDistance
Description copied from interface:AudioSourceSet the reference distance of this AudioSource object.Default value = 1.0f
The Reference Distance is one of the main parameters you have for controlling the way that sounds attenuate with distance. A Source with Reference Distance set to 5 (meters) will be at maximum volume while it is within 5 metere of the listener, and start to fade out as it moves further away. At 10 meters it will be at half volume, and at 20 meters at a quarter volume, etc ...
Applies only to sub-types:
- Source
- Specified by:
setReferenceDistancein interfaceAudioSource- Parameters:
referenceDistance- the Reference Distance for this AudioSource
-
getReferenceDistance
Description copied from interface:AudioSourceReturn the current reference distance settingDefault value = 1.0f
Applies only to sub-types:
- Source
- Specified by:
getReferenceDistancein interfaceAudioSource- Returns:
- Reference Distance of this AudioSource
-
setOffset
Description copied from interface:AudioSourceSet the offset in which to start playback of this AudioSource.Default value = 0
Value is clamped between 0 and length of attached AudioBuffer
Applies only to sub-types:
- Source
- Specified by:
setOffsetin interfaceAudioSource- Parameters:
offset- the offset in samples marking the point to commence playback
-
getOffset
Description copied from interface:AudioSourceReturn the offset in which to start playback of this AudioSource.Default value = 0
Applies only to sub-types:
- Source
- Specified by:
getOffsetin interfaceAudioSource- Returns:
- the offset in samples marking the point to commence playback
-
setMaximumDistance
Description copied from interface:AudioSourceSet the current maximum distance setting.Default value = Audio.MAX_DISTANCE
The maximum distance is that where the volume of the sound would normally be zero.
Applies only to sub-types:
- Source
- Specified by:
setMaximumDistancein interfaceAudioSource- Parameters:
maximumDistance- maximum distance of this source
-
getMaximumDistance
Description copied from interface:AudioSourceReturn the current maximum distance setting.Default value = Audio.MAX_DISTANCE
The maximum distance is that where the volume of the sound would normally be zero.
Applies only to sub-types:
- Source
- Specified by:
getMaximumDistancein interfaceAudioSource- Returns:
- the maximum distance
-
setRollOffFactor
Description copied from interface:AudioSourceSet the roll-off factor of this AudioSource object.Default value = 1.0f
Applies only to sub-types:
- Source
- Specified by:
setRollOffFactorin interfaceAudioSource- Parameters:
rollOffFactor- roll-off factor
-
getRollOffFactor
Description copied from interface:AudioSourceGet the roll-off factor of this AudioSource object.Default value = 1.0f
Applies only to sub-types:
- Source
- Specified by:
getRollOffFactorin interfaceAudioSource- Returns:
- the roll-off factor
-
setLooped
Description copied from interface:AudioSourceSets this AudioSource object to loop infinitely or not.When loop == false, sets the min and max number of loops to zero.
Applies only to sub-types:
- Source
- Specified by:
setLoopedin interfaceAudioSource- Parameters:
loop- infinite loop setting
-
isLooped
Description copied from interface:AudioSourceCheck if this AudioSource object will loop or not.Applies only to sub-types:
- Source
- Specified by:
isLoopedin interfaceAudioSource- Returns:
- boolean loop
-
setMinLoops
Description copied from interface:AudioSourceThe minimum number of times that this AudioSource should loop.When set to 1, the sound will loop once (i.e. play through twice).
When set to LOOP_CONTINUOUS, determines that this AudioSource object should loop indefinitely until explicitly stopped.
Default value = 0
Applies only to sub-types:
- Source
- Specified by:
setMinLoopsin interfaceAudioSource- Parameters:
loops- minimum number of loops
-
getMinLoops
Description copied from interface:AudioSourceReturns the minimum number of times that this AudioSource will loop, or LOOP_CONTINUOUS for infinite looping.Default value = 0
Applies only to sub-types:
- Source
- Specified by:
getMinLoopsin interfaceAudioSource- Returns:
- number of loops
-
setMaxLoops
Description copied from interface:AudioSourceThe maximum number of times that this AudioSource should loop.When set to 1, the sound will loop once (i.e. play through twice).
When set to LOOP_CONTINUOUS, determines that this AudioSource object should loop indefinitely until explicitly stopped.
Default value = 0
Applies only to sub-types:
- Source
- Specified by:
setMaxLoopsin interfaceAudioSource- Parameters:
loops- maximum number of loops
-
calculateLoops
Calculate the number of times to loop playback of this sound. -
getMaxLoops
Description copied from interface:AudioSourceReturns the maximum number of times that this AudioSource will loop, or LOOP_CONTINUOUS for infinite looping.Default value = 0
Applies only to sub-types:
- Source
- Specified by:
getMaxLoopsin interfaceAudioSource- Returns:
- maximum number of loops
-
getNumLoops
Description copied from interface:AudioSourceThe number of times that this AudioSource should loop, or LOOP_CONTINUOUS for infinite looping.When the minimum and maximum number of loops are different, each call to this method will return a different random number that lies between the two settings:
minimum <= number of loops <= maximum
Default value = 0Applies only to sub-types:
- Source
- Specified by:
getNumLoopsin interfaceAudioSource- Returns:
- number of loops
-
getLastNumLoops
Description copied from interface:AudioSourceGet the last value returned byAudioSource.getNumLoops()- Specified by:
getLastNumLoopsin interfaceAudioSource- Returns:
- the number of loops
-
setFadeIn
Description copied from interface:AudioSourceSet the length of time in milliseconds to fade this source inDefault value = 1000
Applies only to sub-types:
- Source
- Specified by:
setFadeInin interfaceAudioSource- Parameters:
fadeInTime- fade-in time in milliseconds
-
getFadeIn
Description copied from interface:AudioSourceRetrieve the length of time in milliseconds to fade this source inDefault value = 1000
Applies only to sub-types:
- Source
- Specified by:
getFadeInin interfaceAudioSource- Returns:
- fade-in time in milliseconds
-
setFadeOut
Description copied from interface:AudioSourceSet the length of time in milliseconds to fade this source inDefault value = 1000
Applies only to sub-types:
- Source
- Specified by:
setFadeOutin interfaceAudioSource- Parameters:
fadeOutTime- fade-out time in milliseconds
-
getFadeOut
Description copied from interface:AudioSourceRetrieve the length of time in milliseconds to fade this source inDefault value = 1000
Applies only to sub-types:
- Source
- Specified by:
getFadeOutin interfaceAudioSource- Returns:
- fade-in time in milliseconds
-
getFadeGain
Used to return the current calculated fade gain for this AudioSource.- Returns:
- current fade gain
-
calculateFades
Calculate the fade gains. -
queueAudioBuffers
-
queueAudioBuffer
-
unqueueAudioBuffers
-
numQueuedBuffers
- Specified by:
numQueuedBuffersin interfaceAudioSource
-
numProcessedBuffers
- Specified by:
numProcessedBuffersin interfaceAudioSource
-
bindAudioBuffer
Binds this AudioSource with the specified AudioBuffer.Applies only to sub-types:
- Source
- Parameters:
buffer- The AudioBuffer to bind to this AudioSource- Returns:
- true if successful
-
setBound
Method to define if this AudioSource has been bound to an AudioBuffer.- Parameters:
bound- True if bound to an AudioBufferr
-
setQueued
-
isBound
Description copied from interface:AudioSourceMethod to return if this AudioSource has been bound to an AudioBufferApplies only to sub-types:
- Source
- Specified by:
isBoundin interfaceAudioSource- Returns:
- True if bound to an AudioBuffer
-
isQueued
Description copied from interface:AudioSourceMethod to return if this AudioSource has AudioBuffers queued to itApplies only to sub-types:
- Source
- Specified by:
isQueuedin interfaceAudioSource- Returns:
- True if AudioBuffers are queued.
-
stateChanged
Description copied from interface:AudioMethod used to update the current state of the Audio object- Specified by:
stateChangedin interfaceAudio- Parameters:
oldState- the former state
-
play
Description copied from interface:AudioSourceMethod to start playing this AudioSource ObjectIf this AudioSource is already playing, this command is ignored.
Applies only to sub-types:
- Source
- Specified by:
playin interfaceAudioSource
-
doPlay
Play the clip from the beginning. If looped, start looping. -
stop
Description copied from interface:AudioSourceMethod to stop playing this AudioSource ObjectApplies only to sub-types:
- Source
- Specified by:
stopin interfaceAudioSource
-
doStop
Stop playing the clip and rewind to the beginning. -
togglePlay
Description copied from interface:AudioSourceMethod to toggle playback of this AudioSource Object reseting positionApplies only to sub-types:
- Source
- Specified by:
togglePlayin interfaceAudioSource
-
doTogglePlay
Toggle the current playing status. Will always start at/return to the beginning of the sample. -
pause
Description copied from interface:AudioSourceMethod to pause playing this AudioSource ObjectApplies only to sub-types:
- Source
- Specified by:
pausein interfaceAudioSource
-
doPause
Stop playing the clip but retain the current position. -
resume
Description copied from interface:AudioSourceMethod to resume playing this AudioSource ObjectApplies only to sub-types:
- Source
- Specified by:
resumein interfaceAudioSource
-
doResume
Play the clip from the current position. -
togglePause
Description copied from interface:AudioSourceMethod to toggle playback of this AudioSource Object retaining postitionApplies only to sub-types:
- Source
- Specified by:
togglePausein interfaceAudioSource
-
doTogglePause
Toggle the current playing status. Will retain the playback position of the sample. -
rewind
Description copied from interface:AudioSourceMethod to rewind this AudioSource ObjectApplies only to sub-types:
- Source
- Specified by:
rewindin interfaceAudioSource
-
doRewind
Rewind clip to the beginning. -
fadeIn
Description copied from interface:AudioSourceMethod to fade in and then play this AudioSource ObjectApplies only to sub-types:
- Source
- Specified by:
fadeInin interfaceAudioSource
-
doFadeIn
Fade in then play this AudioSource. -
fadeOut
Description copied from interface:AudioSourceMethod to fade out and then stop this AudioSource Object only when it is already playing.If not playing, command is ignored.
Applies only to sub-types:
- Source
- Specified by:
fadeOutin interfaceAudioSource
-
doFadeOut
Fade out then stop this AudioSource. -
getFading
Get the current fading status.- Returns:
- fading status
-
attachSourcesToEffects
Description copied from interface:AudioSourceMethod to attach sources to effects- Specified by:
attachSourcesToEffectsin interfaceAudioSource- Returns:
- a number code
-
detachSourcesToEffects
Description copied from interface:AudioSourceMethod to detach sources to effects- Specified by:
detachSourcesToEffectsin interfaceAudioSource- Returns:
- a number code
-
getDebugString
Description copied from interface:AudioSourceGet debug info about this audio source. AbstractAudioSource overrides this to get more debug info. It was previously the method toString().- Specified by:
getDebugStringin interfaceAudioSource- Returns:
- a string with debug info or the result of the method toString()
-