Package javazoom.jl.decoder
Class OutputChannels
- java.lang.Object
-
- javazoom.jl.decoder.OutputChannels
-
public class OutputChannels extends java.lang.ObjectA 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
Fields Modifier and Type Field Description static OutputChannelsBOTHstatic intBOTH_CHANNELSFlag to indicate output should include both channels.static OutputChannelsDOWNMIXstatic intDOWNMIX_CHANNELSFlag to indicate output is mono.static OutputChannelsLEFTstatic intLEFT_CHANNELFlag to indicate output should include the left channel only.static OutputChannelsRIGHTstatic intRIGHT_CHANNELFlag to indicate output should include the right channel only.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static OutputChannelsfromInt(int code)Creates anOutputChannelsinstance corresponding to the given channel code.intgetChannelCount()Retrieves the number of output channels represented by this channel output type.intgetChannelsOutputCode()Retrieves the code representing the desired output channels.inthashCode()
-
-
-
Field Detail
-
BOTH_CHANNELS
public static final int BOTH_CHANNELS
Flag to indicate output should include both channels.- See Also:
- Constant Field Values
-
LEFT_CHANNEL
public static final int LEFT_CHANNEL
Flag to indicate output should include the left channel only.- See Also:
- Constant Field Values
-
RIGHT_CHANNEL
public static final int RIGHT_CHANNEL
Flag to indicate output should include the right channel only.- See Also:
- Constant Field Values
-
DOWNMIX_CHANNELS
public static final int DOWNMIX_CHANNELS
Flag to indicate output is mono.- See Also:
- Constant Field Values
-
LEFT
public static final OutputChannels LEFT
-
RIGHT
public static final OutputChannels RIGHT
-
BOTH
public static final OutputChannels BOTH
-
DOWNMIX
public static final OutputChannels DOWNMIX
-
-
Method Detail
-
fromInt
public static OutputChannels fromInt(int code)
Creates anOutputChannelsinstance corresponding to the given channel code.- Parameters:
code- one of the OutputChannels channel code constants.- Throws:
java.lang.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
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-