Enum Class Device.BitLayout
- All Implemented Interfaces:
Serializable,Comparable<Device.BitLayout>,Constable
- Enclosing interface:
Device
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe lower bits are significant, and insignificant bits are set to zero, This is the default, used where no bit layout is specified.The lower bits are significant, and higher bit equal to the sign, the leftmost significant bits.The higher bits are significant, and insignificant bits are zero. -
Method Summary
Modifier and TypeMethodDescriptionstatic Device.BitLayoutReturns the enum constant of this class with the specified name.static Device.BitLayout[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
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 nameNullPointerException- if the argument is null
-