Package com.tino1b2be.dtmf
Enum Class ChannelMode
- All Implemented Interfaces:
Serializable,Comparable<ChannelMode>,Constable
How an incoming sample array should be interpreted as one or more audio
channels for DTMF detection.
The three cases directly correspond to Requirement 13.1 and drive the
branch in DtmfDetector / DtmfDecoder that selects between a
single-pipeline and dual-pipeline analysis topology:
MONO— treat the sample array as a single channel; emitted tones carrychannel = 0.STEREO_INDEPENDENT— treat the sample array as interleaved left/right PCM, decode each channel independently, and tag emissions withchannel = 0(left, even indices) orchannel = 1(right, odd indices).STEREO_DOWNMIX— average adjacent left/right samples into a single mono stream before detection; emitted tones carrychannel = 0.
Used as the channelMode value of DtmfConfig.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSingle-channel input; all emitted tones carrychannel = 0.Interleaved stereo input averaged into a single mono stream before detection.Interleaved stereo input decoded as two independent channels. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelModeReturns the enum constant of this class with the specified name.static ChannelMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MONO
Single-channel input; all emitted tones carrychannel = 0. -
STEREO_INDEPENDENT
Interleaved stereo input decoded as two independent channels. Emitted tones carrychannel = 0for the left channel (even sample indices) andchannel = 1for the right channel (odd sample indices). -
STEREO_DOWNMIX
Interleaved stereo input averaged into a single mono stream before detection. Emitted tones carrychannel = 0.
-
-
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
-