Enum Class CsvDeltaMode

java.lang.Object
java.lang.Enum<CsvDeltaMode>
org.refcodes.audio.CsvDeltaMode
All Implemented Interfaces:
Serializable, Comparable<CsvDeltaMode>, Constable

public enum CsvDeltaMode extends Enum<CsvDeltaMode>
The CsvDeltaMode defines for which values of a SoundSample only the delta between the current SoundSample being written and the previous SoundSample being written are written to the next row of the CSV file.
  • Enum Constant Details

    • ALL

      public static final CsvDeltaMode ALL
      Delta for all applicable values: Write only the changes for all values between the previous SoundSample and the current SoundSample to the next CSV row.
    • SAMPLING_RATE

      public static final CsvDeltaMode SAMPLING_RATE
      Delta only for the sampling rate: Write only the changes regarding the previous SoundSample's sample rate and the current SoundSample's rate to the next CSV row. Recommended when you are working with a fixed sampling rate.
    • SAMPLE_DATA

      public static final CsvDeltaMode SAMPLE_DATA
      Delta only for the channels' sample data: Write only the changes regarding the previous SoundSample's sample data and the current SoundSample's sample data to the next CSV row.
    • NONE

      public static final CsvDeltaMode NONE
      Always write the full SoundSample's value to the next CSV row. May produce some redundancy overhead.
  • Method Details

    • values

      public static CsvDeltaMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CsvDeltaMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isSamplingRateDelta

      public boolean isSamplingRateDelta()
      Determines whether to write only the sampling rate's deltas per row or explicitly the sampling rate to each row, even when it does not change.
      Returns:
      True when only the deltas of the sampling rate are to be written, else false.
    • isSampleDataDelta

      public boolean isSampleDataDelta()
      Determines whether to write only the sampling data's deltas per row or explicitly the sampling data to each row, even when it does not change.
      Returns:
      True when only the deltas of the sampling data are to be written, else false.