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

public class SudFileDWVHandler extends Object implements SUDNotificationHandler
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 Details

    • SudFileDWVHandler

      public SudFileDWVHandler(STClickControl stClickControl)
  • 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 interface SUDNotificationHandler
    • 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 interface SUDNotificationHandler
    • sudStreamClosed

      public void sudStreamClosed()
      Description copied from interface: SUDNotificationHandler
      SUD stream has closed.
      Specified by:
      sudStreamClosed in interface SUDNotificationHandler
    • progress

      public void progress(double arg0, int arg1, int arg2)
      Specified by:
      progress in interface SUDNotificationHandler
      Specified by:
      progress in interface org.pamguard.x3.sud.SudProgressListener
    • chunkProcessed

      public void chunkProcessed(int chunkID, org.pamguard.x3.sud.Chunk sudChunk)
      Specified by:
      chunkProcessed in interface org.pamguard.x3.sud.SudFileListener
      Specified by:
      chunkProcessed in interface SUDNotificationHandler
    • 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()