soundPlayback
Class PlaybackProcess

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by soundPlayback.PlaybackProcess
All Implemented Interfaces:
Annotator, PamObserver

public class PlaybackProcess
extends PamProcess

Pam Process for sound playback (corralls data from multiple channels and then passes it on to the PlaybackSystem.

For file analysis, playback is through a chosen sound card. For playback of real time data, the playbackSystem is hanbdled by the real time acquisition system - so samples stay synchronised.

Author:
Doug Gillespie
See Also:
PlaybackSystem

Field Summary
private  int[] channelPos
           
(package private)  int haveChannels
           
private  PlaybackControl playbackControl
           
private  RawDataUnit[] rawDataUnits
           
(package private)  boolean running
           
(package private)  int runningChannels
           
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
PlaybackProcess(PlaybackControl playbackControl)
           
 
Method Summary
 void newData(PamObservable o, PamDataUnit arg)
           
 void noteNewSettings()
           
 void pamStart()
          Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway.
 void pamStop()
          Stops the process.
 void prepareProcess()
          Called for each process before any of them receive the PamStart command
 void setSampleRate(float sampleRate, boolean notify)
          New sample rate
 
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, fillXMLParameters, getAncestorDataBlock, getAnnotation, getBackendProcess, getChainPosition, getCpuPercent, getNumAnnotations, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, notifyModelChanged, relMillisecondsToSamples, relSamplesToMilliseconds, removeObservable, removeOutputDatablock, saveViewerData, setBackendProcess, setCanMultiThread, setParentDataBlock, setParentDataBlock, setProcessName, setupProcess, toString, update, updateData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

playbackControl

private PlaybackControl playbackControl

rawDataUnits

private RawDataUnit[] rawDataUnits

channelPos

private int[] channelPos

haveChannels

int haveChannels

runningChannels

int runningChannels

running

boolean running
Constructor Detail

PlaybackProcess

public PlaybackProcess(PlaybackControl playbackControl)
Method Detail

prepareProcess

public void prepareProcess()
Description copied from class: PamProcess
Called for each process before any of them receive the PamStart command

Overrides:
prepareProcess in class PamProcess

setSampleRate

public void setSampleRate(float sampleRate,
                          boolean notify)
Description copied from interface: PamObserver
New sample rate

Specified by:
setSampleRate in interface PamObserver
Overrides:
setSampleRate in class PamProcess
notify - Notify other PamObservers and PamObservables in the chain.

pamStart

public void pamStart()
Description copied from class: PamProcess
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway.

Specified by:
pamStart in class PamProcess

pamStop

public void pamStop()
Description copied from class: PamProcess
Stops the process.

Specified by:
pamStop in class PamProcess

newData

public void newData(PamObservable o,
                    PamDataUnit arg)
Overrides:
newData in class PamProcess

noteNewSettings

public void noteNewSettings()
Specified by:
noteNewSettings in interface PamObserver
Overrides:
noteNewSettings in class PamProcess