Package jmri.jmrit.vsdecoder
Class SoundBite
- java.lang.Object
-
- jmri.jmrit.vsdecoder.VSDSound
-
- jmri.jmrit.vsdecoder.SoundBite
-
- Direct Known Subclasses:
NotchTransition
class SoundBite extends VSDSound
VSD implementation of an audio 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.
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.vsdecoder.VSDSound
BufSysNamePrefix, BufUserNamePrefix, default_exponent, default_gain, default_reference_distance, default_sleep_interval, gain, is_tunnel, myposition, name, SrcSysNamePrefix, SrcUserNamePrefix, t, tunnel_volume, volume
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intattachSourcesToEffects()Method to attach a source to effectsstatic longcalcLength(AudioBuffer buf)static longcalcLength(SoundBite s)(package private) intdetachSourcesToEffects()Method to detach a source to effectsvoidfadeIn()voidfadeOut()AudioBuffergetBuffer()java.lang.StringgetBufferSystemName()java.lang.StringgetBufferUserName()intgetFadeInTime()intgetFadeOutTime()java.lang.StringgetFileName()longgetLength()intgetLengthAsInt()floatgetReferenceDistance()AudioSourcegetSource()java.lang.StringgetSourceSystemName()java.lang.StringgetSourceUserName()java.lang.StringgetSystemName()java.lang.StringgetUserName()(package private) booleanisInitialized()voidloop()voidmute(boolean m)intnumQueuedBuffers()voidpause()voidplay()voidqueueBuffer(AudioBuffer b)voidrewind()voidsetFadeInTime(int t)voidsetFadeOutTime(int t)voidsetFadeTimes(int in, int out)voidsetLength()voidsetLength(long p)voidsetLooped(boolean loop)voidsetPosition(PhysicalLocation v)voidsetReferenceDistance(float r)voidsetURL(java.lang.String filename)voidsetVolume(float v)voidshutdown()voidstop()voidunqueueBuffers()-
Methods inherited from class jmri.jmrit.vsdecoder.VSDSound
changeNotch, changeThrottle, checkForFreeBuffer, getGain, getName, getPosition, getTunnel, getXml, newTimer, setGain, setName, setTunnel, setXml
-
-
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
-
getSystemName
public java.lang.String getSystemName()
-
getUserName
public java.lang.String getUserName()
-
isInitialized
final boolean isInitialized()
-
queueBuffer
public void queueBuffer(AudioBuffer b)
-
unqueueBuffers
public void unqueueBuffers()
-
numQueuedBuffers
public int numQueuedBuffers()
-
getSource
public AudioSource getSource()
-
getBuffer
public AudioBuffer getBuffer()
-
getSourceSystemName
public java.lang.String getSourceSystemName()
-
getSourceUserName
public java.lang.String getSourceUserName()
-
getBufferSystemName
public java.lang.String getBufferSystemName()
-
getBufferUserName
public java.lang.String getBufferUserName()
-
setLooped
public void setLooped(boolean loop)
-
getFadeInTime
public int getFadeInTime()
-
getFadeOutTime
public int getFadeOutTime()
-
setFadeInTime
public void setFadeInTime(int t)
-
setFadeOutTime
public void setFadeOutTime(int t)
-
setFadeTimes
public void setFadeTimes(int in, int out)
-
getReferenceDistance
public float getReferenceDistance()
-
setReferenceDistance
public void setReferenceDistance(float r)
-
pause
public void pause()
-
rewind
public void rewind()
-
setPosition
public void setPosition(PhysicalLocation v)
- Overrides:
setPositionin classVSDSound
-
attachSourcesToEffects
int attachSourcesToEffects()
Method to attach a source to effects- Overrides:
attachSourcesToEffectsin classVSDSound- Returns:
- 0 when failed, 1 when successful
-
detachSourcesToEffects
int detachSourcesToEffects()
Method to detach a source to effects- Overrides:
detachSourcesToEffectsin classVSDSound- Returns:
- 0 when failed, 1 when successful
-
setURL
public void setURL(java.lang.String filename)
-
getLength
public long getLength()
-
getLengthAsInt
public int getLengthAsInt()
-
setLength
public void setLength(long p)
-
setLength
public void setLength()
-
calcLength
public static long calcLength(SoundBite s)
-
calcLength
public static long calcLength(AudioBuffer buf)
-
-