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
FieldsModifier and TypeFieldDescriptionintDuration of automatic recordings in secondsintNumber of seconds between automatic recordingsstatic final int[]Allowable bit depths.intLength of the buffered data to storebooleanBuffer 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.longMaximum length of a single file in Mega bytesintMaximum length of a single file in secondsOutput folder for recording filesName of the raw data sourcestatic final longintNew 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 TypeMethodDescriptionprotected voidcleanTriggerDataList(ArrayList<RecorderTrigger> recorderTriggers) Called before settings are saved to remove settings for any module no longer present.clone()protected voidcreateTriggerDataList(ArrayList<RecorderTrigger> recorderTriggers) Check that everything in the recorderTriggers list is also represented in the triggerDataList.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.intgetChannelBitmap(int availableChannels) get the channel map, but tell it what channels are available !booleangetChannelBitmap(int availableChannels, int iChannel) Get the state of a single channel.Since AudioFileFormat.Type is not serialized, fileType is stored as a sting.doubleGet the largest (enabled) pre trigger timeintGet a set of data that describes all of the parameters in a classbooleanvoidreplaceTriggerData(RecorderTriggerData newData) Find a trigger data object with the same name and replace it.voidsetChannelBitmap(int channelBitmap) intsetChannelBitmap(int iChannel, boolean state) Set the bitmap for a given channel.voidsetFileType(AudioFileFormat.Type fileType) voidsetOutputFolder(String outputFolder) voidsetRoundFileStarts(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.
 - 
createTriggerDataList
Check that everything in the recorderTriggers list is also represented in the triggerDataList.Each recorder trigger can provide a set of default data, which is basically what the programmer has put in to give an idea of suitable data budgets and trigger conditions. These default parameters then get modified by the user to suit their own requirements.
 - 
cleanTriggerDataList
Called before settings are saved to remove settings for any module no longer present.- Parameters:
 recorderTriggers-
 - 
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:ManagedParametersGet a set of data that describes all of the parameters in a class- Specified by:
 getParameterSetin interfaceManagedParameters- Returns:
 - description of the parameters in a class.
 
 
 -