hmi.elckerlyc.audioengine
Class WavAudioUnit

java.lang.Object
  extended by hmi.elckerlyc.planunit.AbstractPlanUnit
      extended by hmi.elckerlyc.audioengine.AudioUnit
          extended by hmi.elckerlyc.audioengine.WavAudioUnit
All Implemented Interfaces:
PlanUnit

public class WavAudioUnit
extends AudioUnit

Plans audio by caching a .wav file, then playing it


Field Summary
private static org.slf4j.Logger logger
           
protected  WavClipUnit wavUnit
           
 
Fields inherited from class hmi.elckerlyc.audioengine.AudioUnit
bmlStartTime, fileName, systemStartTime
 
Fields inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit
bmlBlockPeg
 
Constructor Summary
WavAudioUnit(BMLBlockPeg bbPeg, String fname, String id, String bmlId)
           
 
Method Summary
 void playUnit(double time)
           
protected  void resetUnit()
           
 void sendProgress(double playTime, double time)
          Send progress feedback for all bookmarks passed at playTime.
 void setParameterValue(String paramId, float value)
          Sets a parameter value
 void setParameterValue(String paramId, String value)
          Sets a parameter value
protected  void setupCache()
          load file, determine timing/duration, etc
protected  void startUnit(double time)
          Starts the PlanUnit, is only called once at start
 void stopUnit(double time)
           
 
Methods inherited from class hmi.elckerlyc.audioengine.AudioUnit
getEndPeg, getEndTime, getPreferedDuration, getStartPeg, getStartTime, getTimePeg, hasValidTiming, sendEndProgress, sendStartProgress, setEnd, setEndPeg, setPrefferedDuration, setStart, setStartPeg, setTimePeg, setup, stop
 
Methods inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit
addFeedbackListener, feedback, getAvailableSyncs, getBMLBlockPeg, getBMLId, getId, getRelativeTime, getReplacementGroup, getState, getTime, isDone, isLurking, isPlaying, isSubUnit, play, reset, setState, setSubUnit, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.slf4j.Logger logger

wavUnit

protected WavClipUnit wavUnit
Constructor Detail

WavAudioUnit

public WavAudioUnit(BMLBlockPeg bbPeg,
                    String fname,
                    String id,
                    String bmlId)
Method Detail

sendProgress

public void sendProgress(double playTime,
                         double time)
Description copied from class: AudioUnit
Send progress feedback for all bookmarks passed at playTime.

Specified by:
sendProgress in class AudioUnit
Parameters:
playTime - time since start of the audio unit
time - time since start of BML execution

playUnit

public void playUnit(double time)
              throws PlayException
Specified by:
playUnit in class AbstractPlanUnit
Throws:
PlayException

stopUnit

public void stopUnit(double time)
Specified by:
stopUnit in class AbstractPlanUnit

resetUnit

protected void resetUnit()
Overrides:
resetUnit in class AbstractPlanUnit

startUnit

protected void startUnit(double time)
                  throws PlayException
Description copied from class: AbstractPlanUnit
Starts the PlanUnit, is only called once at start

Overrides:
startUnit in class AbstractPlanUnit
Parameters:
time - global start time
Throws:
PlayException

setupCache

protected void setupCache()
                   throws AudioUnitPlanningException
load file, determine timing/duration, etc

Overrides:
setupCache in class AudioUnit
Throws:
AudioUnitPlanningException

setParameterValue

public void setParameterValue(String paramId,
                              float value)
Description copied from interface: PlanUnit
Sets a parameter value

Specified by:
setParameterValue in interface PlanUnit
Specified by:
setParameterValue in class AudioUnit

setParameterValue

public void setParameterValue(String paramId,
                              String value)
Description copied from interface: PlanUnit
Sets a parameter value