Package SoundRecorder
Class RecorderSettings
java.lang.Object
SoundRecorder.RecorderSettings
- All Implemented Interfaces:
Serializable
,Cloneable
,ManagedParameters
Control parameters for sound recorders.
- Author:
- Doug Gillespie
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionint
Duration of automatic recordings in secondsint
Number of seconds between automatic recordingsstatic final int[]
Allowable bit depths.int
Length of the buffered data to storeboolean
Buffer data so that it can be added to the start of a fileInitials to add to the start of a file name, the rest of which is made up from the date.long
Maximum length of a single file in Mega bytesint
Maximum length of a single file in secondsOutput folder for recording filesName of the raw data sourcestatic final long
int
New start status option to make it easier to automatically start recording.
Tells PAMGuard whether or not to start the recorder when PAMGuard starts. -
Method Summary
Modifier and TypeMethodDescriptionclone()
findTriggerData
(String triggerName) find a set of trigger data by name.findTriggerData
(RecorderTrigger recorderTrigger) Find the active trigger data for a trigger of a given name.int
getChannelBitmap
(int availableChannels) get the channel map, but tell it what channels are available !boolean
getChannelBitmap
(int availableChannels, int iChannel) Get the state of a single channel.Since AudioFileFormat.Type is not serialized, fileType is stored as a sting.double
Get the largest (enabled) pre trigger timeint
Get a set of data that describes all of the parameters in a classboolean
void
replaceTriggerData
(RecorderTriggerData newData) Find a trigger data object with the same name and replace it.void
setChannelBitmap
(int channelBitmap) int
setChannelBitmap
(int iChannel, boolean state) Set the bitmap for a given channel.void
setFileType
(AudioFileFormat.Type fileType) void
setOutputFolder
(String outputFolder) void
setRoundFileStarts
(boolean roundFileStarts)
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
BITDEPTHS
public static final int[] BITDEPTHSAllowable bit depths. -
rawDataSource
Name of the raw data source -
enableBuffer
public boolean enableBufferBuffer data so that it can be added to the start of a file -
bufferLength
public int bufferLengthLength of the buffered data to store -
outputFolder
Output folder for recording files -
fileInitials
Initials to add to the start of a file name, the rest of which is made up from the date. -
autoInterval
public int autoIntervalNumber of seconds between automatic recordings -
autoDuration
public int autoDurationDuration of automatic recordings in seconds -
maxLengthSeconds
public int maxLengthSecondsMaximum length of a single file in seconds -
maxLengthMegaBytes
public long maxLengthMegaBytesMaximum length of a single file in Mega bytes -
startStatus
public int startStatusNew start status option to make it easier to automatically start recording.
Tells PAMGuard whether or not to start the recorder when PAMGuard starts.
-
-
Method Details
-
setOutputFolder
-
isRoundFileStarts
public boolean isRoundFileStarts()- Returns:
- if file start times should be rounded to 'nice' times.
-
setRoundFileStarts
public void setRoundFileStarts(boolean roundFileStarts) - Parameters:
roundFileStarts
- File start times will be rounded to 'nice' times.
-
findTriggerData
Find the active trigger data for a trigger of a given name.If the trigger data cannot be found, add the default set.
- Parameters:
recorderTrigger
-- Returns:
- Active trigger data (started as the default, then got modified by the user)
-
findTriggerData
find a set of trigger data by name.- Parameters:
triggerName
- trigger name- Returns:
- Active trigger data.
-
getLongestHistory
public double getLongestHistory()Get the largest (enabled) pre trigger time- Returns:
- longest time in seconds.
-
clone
-
getFileType
Since AudioFileFormat.Type is not serialized, fileType is stored as a sting. The getter therefore needs to search available file types and return the appropriate one.- Returns:
- Format type for the audio file
- See Also:
-
setFileType
-
replaceTriggerData
Find a trigger data object with the same name and replace it.- Parameters:
newData
-
-
getChannelBitmap
public int getChannelBitmap(int availableChannels) get the channel map, but tell it what channels are available !- Parameters:
availableChannels
- available cahnnels (channel map of parent process)- Returns:
- channel bitmap
-
getNumChannels
public int getNumChannels()- Returns:
- The number of channels to be recorded.
-
setChannelBitmap
public void setChannelBitmap(int channelBitmap) - Parameters:
channelBitmap
- the channelBitmap to set
-
setChannelBitmap
public int setChannelBitmap(int iChannel, boolean state) Set the bitmap for a given channel.- Parameters:
iChannel
- channel numberstate
- on or of (true or false)- Returns:
- channel bitmap
-
getChannelBitmap
public boolean getChannelBitmap(int availableChannels, int iChannel) Get the state of a single channel.- Parameters:
availableChannels
- available channelsiChannel
- channel number- Returns:
- true or false.
-
getParameterSet
Description copied from interface:ManagedParameters
Get a set of data that describes all of the parameters in a class- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-