Package Acquisition.sud
Class SudAudioFile
java.lang.Object
Acquisition.pamAudio.WavAudioFile
Acquisition.sud.SudAudioFile
- All Implemented Interfaces:
PamAudioFileLoader
,PamSettings
,SettingsNameProvider
Opens a .sud audio file.
Sud files contain X3 compressed audio data. The sud file reader opens files, creating a map of the file and saving the map as a.sudx file so it can be read more rapidly when the file is next accessed.
The SudioAudioInput stream fully implements AudioInputStream and so sud files can be accessed using much of the same code as .wav files.
- Author:
- Jamie Macaulay
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
Opens an sud file on a different thread and adds a listener for a mapping. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAudioStream
(File soundFile) Get the audio stream for the filegetName()
Get the name of the file.Get a settings pane for the audio loaderlong
boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) Methods inherited from class Acquisition.pamAudio.WavAudioFile
getFileExtensions, isSoundFile, loadAudioData, main
-
Constructor Details
-
SudAudioFile
public SudAudioFile()
-
-
Method Details
-
getName
Description copied from interface:PamAudioFileLoader
Get the name of the file.- Specified by:
getName
in interfacePamAudioFileLoader
- Overrides:
getName
in classWavAudioFile
- Returns:
- the name of the file
-
getAudioStream
Description copied from interface:PamAudioFileLoader
Get the audio stream for the file- Specified by:
getAudioStream
in interfacePamAudioFileLoader
- Overrides:
getAudioStream
in classWavAudioFile
- Returns:
- the audio input stream.
-
getSettingsPane
Description copied from interface:PamAudioFileLoader
Get a settings pane for the audio loader- Specified by:
getSettingsPane
in interfacePamAudioFileLoader
- Overrides:
getSettingsPane
in classWavAudioFile
- Returns:
- settings pane for audio loader - can be null.
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-
getSudParams
-