Enum Class WaveFormat.Encoding
- All Implemented Interfaces:
Serializable,Comparable<WaveFormat.Encoding>,Constable
- Enclosing class:
- WaveFormat
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).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIEEE 754 floating-point PCM, already in[-1.0, 1.0]by convention and read without scaling.Two's-complement signed integer PCM. -
Method Summary
Modifier and TypeMethodDescriptionstatic WaveFormat.EncodingReturns the enum constant of this class with the specified name.static WaveFormat.Encoding[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PCM_SIGNED
Two's-complement signed integer PCM. Corresponds towFormatTag = 0x0001in thefmtchunk, or to theKSDATAFORMAT_SUBTYPE_PCMGUID when the file usesWAVEFORMATEXTENSIBLE. Valid bit depths are{16, 24, 32}for the WAV container; a64-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
IEEE 754 floating-point PCM, already in[-1.0, 1.0]by convention and read without scaling. Corresponds towFormatTag = 0x0003, or to theKSDATAFORMAT_SUBTYPE_IEEE_FLOATGUID underWAVEFORMATEXTENSIBLE. Valid bit depths are{32, 64}only.
-
-
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
-