ddf.minim
Class AudioSample

java.lang.Object
  extended by ddf.minim.Controller
      extended by ddf.minim.AudioSource
          extended by ddf.minim.AudioSample
All Implemented Interfaces:
BufferedAudio, Effectable, Recordable, Triggerable

public abstract class AudioSample
extends AudioSource
implements BufferedAudio, Triggerable

An 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 AudioEffects 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.

Author:
Damien Di Fede

Field Summary
 
Fields inherited from class ddf.minim.AudioSource
left, mix, right
 
Fields inherited from class ddf.minim.Controller
BALANCE, GAIN, MUTE, PAN, SAMPLE_RATE, VOLUME
 
Fields inherited from interface ddf.minim.BufferedAudio
LEFT, RIGHT
 
Constructor Summary
AudioSample(AudioOut output)
          Constructs an AudioSample object that gets its audio from stream.
 
Method Summary
abstract  AudioMetaData getMetaData()
           
 
Methods inherited from class ddf.minim.AudioSource
addEffect, addListener, bufferSize, clearEffects, close, disableEffect, disableEffect, effectCount, effects, enableEffect, enableEffect, getEffect, getFormat, hasEffect, isEffected, isEnabled, noEffects, removeEffect, removeEffect, removeListener, sampleRate, type
 
Methods inherited from class ddf.minim.Controller
balance, gain, getBalance, getControl, getControls, getGain, getPan, getVolume, hasControl, isMuted, mute, pan, printControls, setBalance, setGain, setPan, setVolume, shiftBalance, shiftGain, shiftPan, shiftVolume, unmute, volume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ddf.minim.BufferedAudio
getChannel, length
 
Methods inherited from interface ddf.minim.Triggerable
stop, trigger
 

Constructor Detail

AudioSample

public AudioSample(AudioOut output)
Constructs an AudioSample object that gets its audio from stream.

Parameters:
stream - the stream that will provide the audio
Method Detail

getMetaData

public abstract AudioMetaData getMetaData()
Returns:
the AudioMetaData for the sample.