Package Acquisition.sud
Class SudAudioFileReader
java.lang.Object
Acquisition.sud.SudAudioFileReader
Audio file reader for a .sud file. .sud files are a file format used by SoundTraps which contain
 blocks of X3 compressed data.
- Author:
 - Jamie Macaulay
 
- 
Constructor Summary
ConstructorsConstructorDescriptionConstructor to create an Sud Audio reader with a default true to zeropad sud files.SudAudioFileReader(boolean zeroPad) Constructor to create an Sud Audio reader. - 
Method Summary
Modifier and TypeMethodDescriptiongetAudioInputStream(File file) Get the audio input streamn.getAudioInputStream(File file, org.pamguard.x3.sud.SudMapListener mapListener) Get the audio input stream for a sud file. 
- 
Constructor Details
- 
SudAudioFileReader
public SudAudioFileReader()Constructor to create an Sud Audio reader with a default true to zeropad sud files. - 
SudAudioFileReader
public SudAudioFileReader(boolean zeroPad) Constructor to create an Sud Audio reader. Allows the option of zero padding. Zero padding fills gaps in sud files with zeros - these gaps are usually due to errors in the recording hardware.Without zero pad then time drift within a file can be difficult to predict, however zero padding means the sample numbers in other files e.g. csv sensor files will not align.- Parameters:
 zeroPad- - true to zero pad sud files.
 
 - 
 - 
Method Details
- 
getAudioInputStream
public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException Get the audio input streamn.- Parameters:
 file- - the .sud file to open.- Returns:
 - the sud AudioStream.
 - Throws:
 UnsupportedAudioFileExceptionIOException
 - 
getAudioInputStream
public AudioInputStream getAudioInputStream(File file, org.pamguard.x3.sud.SudMapListener mapListener) throws UnsupportedAudioFileException, IOException Get the audio input stream for a sud file.- Parameters:
 file- - the .sud file to open.mapListener- - a listener for the sud file maps - can be null.- Returns:
 - the sud AudioStream.
 - Throws:
 UnsupportedAudioFileExceptionIOException
 
 -