Enum Class WaveFormat.Encoding

java.lang.Object
java.lang.Enum<WaveFormat.Encoding>
com.tino1b2be.dtmf.io.wav.internal.WaveFormat.Encoding
All Implemented Interfaces:
Serializable, Comparable<WaveFormat.Encoding>, Constable
Enclosing class:
WaveFormat

public static enum WaveFormat.Encoding extends Enum<WaveFormat.Encoding>
Numeric-format discriminator for a validated WAV stream. Only the two encodings supported by this module appear here — the parser rejects µ-law, A-law, ADPCM and every other compressed wFormatTag value before a WaveFormat is ever constructed (Requirement 9.10).
  • Enum Constant Details

    • PCM_SIGNED

      public static final WaveFormat.Encoding PCM_SIGNED
      Two's-complement signed integer PCM. Corresponds to wFormatTag = 0x0001 in the fmt chunk, or to the KSDATAFORMAT_SUBTYPE_PCM GUID when the file uses WAVEFORMATEXTENSIBLE. Valid bit depths are {16, 24, 32} for the WAV container; a 64-bit signed-integer WAV is pathological and not expected in the wild, but the record itself imposes no upper bit-depth limit beyond the shared {16, 24, 32, 64} set.
    • IEEE_FLOAT

      public static final WaveFormat.Encoding IEEE_FLOAT
      IEEE 754 floating-point PCM, already in [-1.0, 1.0] by convention and read without scaling. Corresponds to wFormatTag = 0x0003, or to the KSDATAFORMAT_SUBTYPE_IEEE_FLOAT GUID under WAVEFORMATEXTENSIBLE. Valid bit depths are {32, 64} only.
  • Method Details

    • values

      public static WaveFormat.Encoding[] 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 WaveFormat.Encoding 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