Package soundPlayback
Class PlaybackProcess
java.lang.Object
PamguardMVC.PamProcess
PamguardMVC.PamInstantProcess
soundPlayback.PlaybackProcess
- All Implemented Interfaces:
 PamObserver,ProcessAnnotator
Pam Process for sound playback (controls 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 ideally handled by the real time acquisition system - so samples stay synchronised.
- Author:
 - Doug Gillespie
 - See Also:
 
- 
Field Summary
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRate - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionA list of data block class types which are compatible as parent data blocks for the PamProcess.floatNote that this is the sample rate of the input data, not the playback output data.doubleGet the source data sample rate.voidnewData(PamObservable o, PamDataUnit arg) voidvoidpamStart()Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).voidpamStop()Stops the process.voidCalled for each process before any of them receive the PamStart commandbooleanprepareProcess(double sourceSampleRate) voidCalled from speed slider on sidebar.voidsetGain(int gaindB) voidsetSampleRate(float sampleRate, boolean notify) New sample ratevoidSetup a high pass filter on the data.Methods inherited from class PamguardMVC.PamInstantProcess
setParentDataBlock, setParentDataBlockMethods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, notifyModelChanged, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setProcessCheck, setProcessName, setupProcess, toString, updateData 
- 
Constructor Details
- 
PlaybackProcess
 
 - 
 - 
Method Details
- 
prepareProcess
public void prepareProcess()Description copied from class:PamProcessCalled for each process before any of them receive the PamStart command- Overrides:
 prepareProcessin classPamProcess
 - 
prepareProcess
public boolean prepareProcess(double sourceSampleRate)  - 
resetDecimator
public void resetDecimator()Called from speed slider on sidebar. - 
setSampleRate
public void setSampleRate(float sampleRate, boolean notify) Description copied from interface:PamObserverNew sample rate- Specified by:
 setSampleRatein interfacePamObserver- Overrides:
 setSampleRatein classPamProcess- Parameters:
 sampleRate-notify- Notify other PamObservers and PamObservables in the chain.
 - 
pamStart
public void pamStart()Description copied from class:PamProcessCalled for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
 pamStartin classPamProcess
 - 
pamStop
public void pamStop()Description copied from class:PamProcessStops the process.- Specified by:
 pamStopin classPamProcess
 - 
newData
- Overrides:
 newDatain classPamProcess
 - 
noteNewSettings
public void noteNewSettings()- Specified by:
 noteNewSettingsin interfacePamObserver- Overrides:
 noteNewSettingsin classPamProcess
 - 
getSampleRate
public float getSampleRate()Note that this is the sample rate of the input data, not the playback output data. Probably best not to call it !- Overrides:
 getSampleRatein classPamProcess- Returns:
 - The sample rate in the process
 
 - 
getSourceSampleRate
public double getSourceSampleRate()Get the source data sample rate.- Returns:
 
 - 
setUpFilter
public void setUpFilter()Setup a high pass filter on the data. This will run before the decimator to keep it all simple ! - 
setGain
public void setGain(int gaindB)  - 
getSampleRateData
- Returns:
 - the sampleRateData
 
 - 
getPreProcesses
- Returns:
 - the preProcesses
 
 - 
getCompatibleDataUnits
Description copied from class:PamProcessA list of data block class types which are compatible as parent data blocks for the PamProcess. This can return null, e.g. in the case of Acquisition process.- Overrides:
 getCompatibleDataUnitsin classPamProcess- Returns:
 - a list of PamDataBlock sub class types which can be used as parent data blocks for the process.
 
 
 -