fi.helsinki.cs.ohtu.mpeg2.audio
Enum AudioEncoder.Mode

java.lang.Object
  extended by java.lang.Enum<AudioEncoder.Mode>
      extended by fi.helsinki.cs.ohtu.mpeg2.audio.AudioEncoder.Mode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AudioEncoder.Mode>
Enclosing class:
AudioEncoder

public static enum AudioEncoder.Mode
extends java.lang.Enum<AudioEncoder.Mode>

Represents an encoder mode. Encoder implementations might support only a subset of these.


Enum Constant Summary
DUAL_CHANNEL
          Dual channel encoding (two non-related channels)
JOINT_STEREO
          Joint stereo encoding (channels joined on higher frequencies)
MS_STEREO
          M/S stereo encoding (channels coded into a mid and a side channel)
SINGLE_CHANNEL
          Single channel encoding
STEREO
          Stereo encoding
 
Field Summary
private  int channels
           
 
Method Summary
 int getChannels()
          Returns the number of channels for this mode.
static AudioEncoder.Mode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AudioEncoder.Mode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SINGLE_CHANNEL

public static final AudioEncoder.Mode SINGLE_CHANNEL
Single channel encoding


STEREO

public static final AudioEncoder.Mode STEREO
Stereo encoding


DUAL_CHANNEL

public static final AudioEncoder.Mode DUAL_CHANNEL
Dual channel encoding (two non-related channels)


JOINT_STEREO

public static final AudioEncoder.Mode JOINT_STEREO
Joint stereo encoding (channels joined on higher frequencies)


MS_STEREO

public static final AudioEncoder.Mode MS_STEREO
M/S stereo encoding (channels coded into a mid and a side channel)

Field Detail

channels

private final int channels
Method Detail

values

public static AudioEncoder.Mode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AudioEncoder.Mode c : AudioEncoder.Mode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AudioEncoder.Mode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getChannels

public int getChannels()
Returns the number of channels for this mode.

Returns:
Number of channels