public abstract class AudioSample extends AudioSource implements BufferedAudio, Triggerable
AudioSample
is a special kind of file playback that allows
you to repeatedly trigger an audio file. It does this by keeping the
entire file in an internal buffer and then keeping a list of trigger points.
It is Recordable
and Effectable
so access to the samples is
available and AudioEffect
s can be attached to it, but there
are not the cueing abilities found on an AudioSnippet
and
AudioPlayer
. All you can do is trigger()
the
sound. However, you can trigger the sound even if it is still playing back.
It is not advised that you use this class for long sounds (like entire songs,
for example) because the entire file is kept in memory.left, mix, right
BALANCE, GAIN, MUTE, PAN, SAMPLE_RATE, VOLUME
LEFT, RIGHT
Constructor and Description |
---|
AudioSample(AudioOut output)
Constructs an AudioSample object that gets its audio from stream.
|
Modifier and Type | Method and Description |
---|---|
abstract AudioMetaData |
getMetaData() |
addEffect, addListener, bufferSize, clearEffects, close, disableEffect, disableEffect, effectCount, effects, enableEffect, enableEffect, getEffect, getFormat, hasEffect, isEffected, isEnabled, noEffects, removeEffect, removeEffect, removeListener, sampleRate, type
balance, gain, getBalance, getControl, getControls, getGain, getPan, getVolume, hasControl, isMuted, mute, pan, printControls, setBalance, setGain, setPan, setVolume, shiftBalance, shiftGain, shiftPan, shiftVolume, unmute, volume
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChannel, length
stop, trigger
public AudioSample(AudioOut output)
stream
- the stream that will provide the audiopublic abstract AudioMetaData getMetaData()