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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA list of data block class types which are compatible as parent data blocks for the PamProcess.float
Note that this is the sample rate of the input data, not the playback output data.double
Get the source data sample rate.void
newData
(PamObservable o, PamDataUnit arg) void
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
Called for each process before any of them receive the PamStart commandboolean
prepareProcess
(double sourceSampleRate) void
Called from speed slider on sidebar.void
setGain
(int gaindB) void
setSampleRate
(float sampleRate, boolean notify) New sample ratevoid
Setup a high pass filter on the data.Methods inherited from class PamguardMVC.PamInstantProcess
setParentDataBlock, setParentDataBlock
Methods 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:PamProcess
Called for each process before any of them receive the PamStart command- Overrides:
prepareProcess
in 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:PamObserver
New sample rate- Specified by:
setSampleRate
in interfacePamObserver
- Overrides:
setSampleRate
in classPamProcess
- Parameters:
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 classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
newData
- Overrides:
newData
in classPamProcess
-
noteNewSettings
public void noteNewSettings()- Specified by:
noteNewSettings
in interfacePamObserver
- Overrides:
noteNewSettings
in 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:
getSampleRate
in 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:PamProcess
A 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:
getCompatibleDataUnits
in classPamProcess
- Returns:
- a list of PamDataBlock sub class types which can be used as parent data blocks for the process.
-