Enum Class Device.BitLayout

java.lang.Object
java.lang.Enum<Device.BitLayout>
net.avadeaux.klipspringer.codec.Device.BitLayout
All Implemented Interfaces:
Serializable, Comparable<Device.BitLayout>, Constable
Enclosing interface:
Device

public static enum Device.BitLayout extends Enum<Device.BitLayout>
Specification for where bits are placed when the bytes allocated for a sample are not completely filled by the sample bits. This can be because the bit depth is not a muliple of eight, or because four bytes are allocated for 24-bit samples. See blog post for explanation of the formats. PcmBuffer can be used for converting between layouts and other sample encoding discrepancies.
  • Enum Constant Details

    • LSB

      public static final Device.BitLayout LSB
      The lower bits are significant, and insignificant bits are set to zero, This is the default, used where no bit layout is specified.
    • MSB

      public static final Device.BitLayout MSB
      The higher bits are significant, and insignificant bits are zero. This corresponds to scaling up the samples, so that they can be read as if all the bits are significant. This is used by LAME and in the WAV format.
    • LSBX

      public static final Device.BitLayout LSBX
      The lower bits are significant, and higher bit equal to the sign, the leftmost significant bits. This can only be used when the encoding is signed. Values in this format can be read as if all the bits are significant, producing signed values within the range dictated by the number of bits per sample. It is used in FLAC encoding.
  • Method Details

    • values

      public static Device.BitLayout[] 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 Device.BitLayout 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