Package SoundRecorder
Class RecorderProcess
java.lang.Object
PamguardMVC.PamProcess
SoundRecorder.RecorderProcess
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
Process raw audio data prior to storage. Raw data blocks
only contain one channel of data each. RecorderProcess stacks
up the data from all channels before passing it on the the
RecorderStorage
- Author:
- Doug
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
Flag that when recording starts the buffer should be grabbed and inserted at the start of the recording.Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
boolean
void
newData
(PamObservable o, PamDataUnit arg) 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 commandprotected void
setRecordStatus
(int status, String actionTrigger) void
setSampleRate
(float sampleRate, boolean notify) New sample rateprotected boolean
protected void
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setupProcess, toString, updateData
-
Field Details
-
grabBuffer
protected double grabBufferFlag that when recording starts the buffer should be grabbed and inserted at the start of the recording. If recording is already running, then this flag will have no effect. It is always cleared at the end of a recording. It's an integer value, so that different recorder triggers can demand different amounts of buffer.
-
-
Constructor Details
-
RecorderProcess
-
-
Method Details
-
getRequiredDataHistory
- Specified by:
getRequiredDataHistory
in interfacePamObserver
- Overrides:
getRequiredDataHistory
in classPamProcess
- Parameters:
arg
- optional argument from PamObservable- Returns:
- time in milliseconds required by data held in PamObservable
-
newData
- Overrides:
newData
in classPamProcess
-
setRecordStatus
-
stopRecording
protected boolean stopRecording() -
storageClosed
protected void storageClosed() -
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:
sampleRate
-notify
- Notify other PamObservers and PamObservables in the chain.
-
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
-
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
-
isDataComing
public boolean isDataComing()
-