Package javazoom.jl.decoder
Class OutputChannels
java.lang.Object
javazoom.jl.decoder.OutputChannels
A Type-safe representation of the the supported output channel
constants.
This class is immutable and, hence, is thread safe.
- Since:
- 0.0.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OutputChannels
static final int
Flag to indicate output should include both channels.static final OutputChannels
static final int
Flag to indicate output is mono.static final OutputChannels
static final int
Flag to indicate output should include the left channel only.static final OutputChannels
static final int
Flag to indicate output should include the right channel only. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static OutputChannels
fromInt
(int code) Creates anOutputChannels
instance corresponding to the given channel code.int
Retrieves the number of output channels represented by this channel output type.int
Retrieves the code representing the desired output channels.int
hashCode()
-
Field Details
-
BOTH_CHANNELS
public static final int BOTH_CHANNELSFlag to indicate output should include both channels.- See Also:
-
LEFT_CHANNEL
public static final int LEFT_CHANNELFlag to indicate output should include the left channel only.- See Also:
-
RIGHT_CHANNEL
public static final int RIGHT_CHANNELFlag to indicate output should include the right channel only.- See Also:
-
DOWNMIX_CHANNELS
public static final int DOWNMIX_CHANNELSFlag to indicate output is mono.- See Also:
-
LEFT
-
RIGHT
-
BOTH
-
DOWNMIX
-
-
Method Details
-
fromInt
Creates anOutputChannels
instance corresponding to the given channel code.- Parameters:
code
- one of the OutputChannels channel code constants.- Throws:
IllegalArgumentException
- if code is not a valid channel code.
-
getChannelsOutputCode
public int getChannelsOutputCode()Retrieves the code representing the desired output channels. Will be one of LEFT_CHANNEL, RIGHT_CHANNEL, BOTH_CHANNELS or DOWNMIX_CHANNELS.- Returns:
- the channel code represented by this instance.
-
getChannelCount
public int getChannelCount()Retrieves the number of output channels represented by this channel output type.- Returns:
- The number of output channels for this channel output type. This will be 2 for BOTH_CHANNELS only, and 1 for all other types.
-
equals
-
hashCode
public int hashCode()
-