Package PamDetection

Class RawDataUnit

All Implemented Interfaces:
Comparable<PamDataUnit>, AcousticDataUnit
Direct Known Subclasses:
TriggerWaveDataUnit

public class RawDataUnit extends PamDataUnit<PamDataUnit,SuperDetection> implements AcousticDataUnit
Holds raw data from a sound file.
Author:
Doug Gillespie.
  • Constructor Details

    • RawDataUnit

      public RawDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration)
  • Method Details

    • getRawData

      public double[] getRawData()
      Returns:
      Returns the rawData.
    • setRawData

      public void setRawData(double[] rawData)
      Parameters:
      rawData - The rawData to set.
    • setRawData

      public void setRawData(double[] rawData, boolean setAmplitude)
      Parameters:
      rawData - The rawData to set.
    • setFileSamples

      public void setFileSamples(long fileSamples)
      Set the file samples. The file samples are the total number of samples into an audio file the raw data unit starts at. It is not necessarily the same as start sample depending on how the file has been loaded.
      Parameters:
      fileSamples - - the numeber of samples (not bytes) into the audio file.
    • getFileSamples

      public long getFileSamples()
      Get the file samples. The file samples are the total number of samples into an audio file the raw data unit starts at. It is not necessarily the same as start sample depending on how the file has been loaded.