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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoundBite.BufferMode
-
Field Summary
Fields Modifier and Type Field Description (package private) SoundBite.BufferMode
bufferMode
(package private) java.lang.String
filename
(package private) boolean
initialized
(package private) long
length
(package private) boolean
looped
(package private) int
maxloops
(package private) int
minloops
(package private) float
rd
(package private) AudioBuffer
sound_buf
(package private) AudioSource
sound_src
(package private) java.lang.String
system_name
(package private) java.lang.String
user_name
-
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 static long
calcLength(AudioBuffer buf)
static long
calcLength(SoundBite s)
void
fadeIn()
void
fadeOut()
AudioBuffer
getBuffer()
java.lang.String
getBufferSystemName()
java.lang.String
getBufferUserName()
int
getFadeInTime()
int
getFadeOutTime()
java.lang.String
getFileName()
long
getLength()
int
getLengthAsInt()
float
getReferenceDistance()
AudioSource
getSource()
java.lang.String
getSourceSystemName()
java.lang.String
getSourceUserName()
java.lang.String
getSystemName()
java.lang.String
getUserName()
boolean
init(VSDFile vf, SoundBite.BufferMode mode)
boolean
isInitialized()
boolean
isLooped()
void
loop()
void
mute(boolean m)
int
numQueuedBuffers()
void
pause()
void
play()
void
queueBuffer(AudioBuffer b)
void
rewind()
void
setFadeInTime(int t)
void
setFadeOutTime(int t)
void
setFadeTimes(int in, int out)
void
setLength()
void
setLength(long p)
void
setLooped(boolean loop)
void
setLooped(boolean loop, int minloops, int maxloops)
void
setPosition(PhysicalLocation v)
void
setReferenceDistance(float r)
void
setURL(java.lang.String filename)
void
setVolume(float v)
void
shutdown()
void
stop()
void
unqueueBuffers()
-
Methods inherited from class jmri.jmrit.vsdecoder.VSDSound
changeNotch, changeThrottle, getGain, getName, getPosition, getTunnel, getXml, newTimer, setGain, setName, setTunnel, setXml
-
-
-
-
Field Detail
-
filename
java.lang.String filename
-
system_name
java.lang.String system_name
-
user_name
java.lang.String user_name
-
sound_buf
AudioBuffer sound_buf
-
sound_src
AudioSource sound_src
-
initialized
boolean initialized
-
looped
boolean looped
-
minloops
int minloops
-
maxloops
int maxloops
-
rd
float rd
-
length
long length
-
bufferMode
SoundBite.BufferMode bufferMode
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
-
getSystemName
public java.lang.String getSystemName()
-
getUserName
public java.lang.String getUserName()
-
isInitialized
public boolean isInitialized()
-
init
public final boolean init(VSDFile vf, SoundBite.BufferMode mode)
-
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, int minloops, int maxloops)
-
setLooped
public void setLooped(boolean loop)
-
isLooped
public boolean isLooped()
-
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:
setPosition
in classVSDSound
-
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)
-
-