Package soundtrap.sud
Class SudFileDWVHandler
java.lang.Object
soundtrap.sud.SudFileDWVHandler
- All Implemented Interfaces:
SUDNotificationHandler
,org.pamguard.x3.sud.SudFileListener
,org.pamguard.x3.sud.SudProgressListener
Class to handle BCL and DWV data from a SUD file during sud file processing.
SUD files are the compressed data files from soundtraps. The latest PAMGuard
version contains a audioinputstream for SUD files, making it possible to
process them withoug having to first inflate them to wav files. During
'normal mode' processing, this class will subscribe to packets from the SUD
files, unpack what would normally be BCL and DWV data and generate
appropriate binary output files.
- Author:
- dg50
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
chunkProcessed
(int chunkID, org.pamguard.x3.sud.Chunk sudChunk) void
interpretNewFile
(String newFile, org.pamguard.x3.sud.SudAudioInputStream sudAudioInputStream) Notification that a new file or folder is selected.void
newSudInputStream
(org.pamguard.x3.sud.SudAudioInputStream sudAudioInputStream) A new SUD file input stream has been opened.void
pamStart()
void
pamStop()
void
progress
(double arg0, int arg1, int arg2) boolean
void
SUD stream has closed.void
swapEndian
(byte[] data) Pairwise byte swap, i.e.
-
Constructor Details
-
SudFileDWVHandler
-
-
Method Details
-
newSudInputStream
public void newSudInputStream(org.pamguard.x3.sud.SudAudioInputStream sudAudioInputStream) Description copied from interface:SUDNotificationHandler
A new SUD file input stream has been opened.- Specified by:
newSudInputStream
in interfaceSUDNotificationHandler
-
interpretNewFile
public void interpretNewFile(String newFile, org.pamguard.x3.sud.SudAudioInputStream sudAudioInputStream) Description copied from interface:SUDNotificationHandler
Notification that a new file or folder is selected. This is called when a file or folder is selected in the dialog, NOT when acquisition starts, so is a good opportunity for the SUD Click Detector to work out channel maps and sample rates.- Specified by:
interpretNewFile
in interfaceSUDNotificationHandler
-
sudStreamClosed
public void sudStreamClosed()Description copied from interface:SUDNotificationHandler
SUD stream has closed.- Specified by:
sudStreamClosed
in interfaceSUDNotificationHandler
-
progress
public void progress(double arg0, int arg1, int arg2) - Specified by:
progress
in interfaceSUDNotificationHandler
- Specified by:
progress
in interfaceorg.pamguard.x3.sud.SudProgressListener
-
chunkProcessed
public void chunkProcessed(int chunkID, org.pamguard.x3.sud.Chunk sudChunk) - Specified by:
chunkProcessed
in interfaceorg.pamguard.x3.sud.SudFileListener
- Specified by:
chunkProcessed
in interfaceSUDNotificationHandler
-
swapEndian
public void swapEndian(byte[] data) Pairwise byte swap, i.e. change endianness of int16's. Won't work for anything else.- Parameters:
data
-
-
pamStart
public void pamStart() -
pamStop
public void pamStop() -
subscribeSUD
public boolean subscribeSUD()
-