paulscode.sound.libraries
Class LibraryJavaSound.MixerRanking

java.lang.Object
  extended by paulscode.sound.libraries.LibraryJavaSound.MixerRanking
Enclosing class:
LibraryJavaSound

public static class LibraryJavaSound.MixerRanking
extends java.lang.Object

The MixerRanking class is used to determine the capabilities of a mixer, and to give it a ranking based on the priority of those capabilities.


Field Summary
static int GAIN_CONTROL_PRIORITY
          Priority for the gain control.
 boolean gainControlOK
          Indicates whether or not gain controls are possible on the Mixer.
static int HIGH
          A priority of HIGH means the Mixer is not usable if the capability is not available.
static int LINE_COUNT_PRIORITY
          Priority for the desired maximum line-count.
 boolean lineCountOK
          Indicates whether or not the desired number of lines can be created on the Mixer.
static int LOW
          A priority of LOW means the Mixer is usable without the capability, but functionality may be somewhat limited.
static int MAX_SAMPLE_RATE_PRIORITY
          Priority for the desired maximum sample-rate compatibility.
 int maxLinesPossible
          Indicates the maximum number of output lines the Mixer can handle.
 boolean maxSampleRateOK
          Indicates whether or not the desired maximum sample-rate is compatible on the Mixer.
 int maxSampleRatePossible
          Indicates the maximum sample rate possible for the Mixer, or -1 if no sample rate is possible.
static int MEDIUM
          A priority of MEDIUM means the Mixer is usable without the capability, but functionality is greatly limited.
static int MIN_SAMPLE_RATE_PRIORITY
          Priority for the desired minimum sample-rate compatibility.
 boolean minSampleRateOK
          Indicates whether or not the desired minimum sample-rate is compatible on the Mixer.
 int minSampleRatePossible
          Indicates the minimum sample rate possible for the Mixer, or -1 if no sample rate is possible.
static int MIXER_EXISTS_PRIORITY
          Priority for the Mixer existing.
 boolean mixerExists
          Indicates whether or not the Mixer exists.
 javax.sound.sampled.Mixer.Info mixerInfo
          Standard information about the Mixer.
static int NONE
          A priority of NONE means the Mixer is fully functional, and loss of this capability does not affect the overall ranking.
static int PAN_CONTROL_PRIORITY
          Priority for the pan control.
 boolean panControlOK
          Indicates whether or not pan controls are possible on the Mixer.
 int rank
          The Mixer's overall ranking.
static int SAMPLE_RATE_CONTROL_PRIORITY
          Priority for the sample-rate control.
 boolean sampleRateControlOK
          Indicates whether or not sample-rate controls are possible on the Mixer.
 
Constructor Summary
LibraryJavaSound.MixerRanking()
          Constructor: Instantiates a Mixer ranking with default initial values.
LibraryJavaSound.MixerRanking(javax.sound.sampled.Mixer.Info i, int r, boolean e, boolean mnsr, boolean mxsr, boolean lc, boolean gc, boolean pc, boolean src)
          Constructor: Instantiates a Mixer ranking with specified initial values.
 
Method Summary
 void rank(javax.sound.sampled.Mixer.Info i)
          Looks up the specified Mixer, tests its capabilities, and calculates its overall ranking.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIGH

public static final int HIGH
A priority of HIGH means the Mixer is not usable if the capability is not available.

See Also:
Constant Field Values

MEDIUM

public static final int MEDIUM
A priority of MEDIUM means the Mixer is usable without the capability, but functionality is greatly limited.

See Also:
Constant Field Values

LOW

public static final int LOW
A priority of LOW means the Mixer is usable without the capability, but functionality may be somewhat limited.

See Also:
Constant Field Values

NONE

public static final int NONE
A priority of NONE means the Mixer is fully functional, and loss of this capability does not affect the overall ranking. Used to ignore capibilities not used by a particular application.

See Also:
Constant Field Values

MIXER_EXISTS_PRIORITY

public static int MIXER_EXISTS_PRIORITY
Priority for the Mixer existing. Should always be HIGH.


MIN_SAMPLE_RATE_PRIORITY

public static int MIN_SAMPLE_RATE_PRIORITY
Priority for the desired minimum sample-rate compatibility. By default, this is HIGH.


MAX_SAMPLE_RATE_PRIORITY

public static int MAX_SAMPLE_RATE_PRIORITY
Priority for the desired maximum sample-rate compatibility. By default, this is HIGH.


LINE_COUNT_PRIORITY

public static int LINE_COUNT_PRIORITY
Priority for the desired maximum line-count. By default, this is HIGH.


GAIN_CONTROL_PRIORITY

public static int GAIN_CONTROL_PRIORITY
Priority for the gain control. By default, this is MEDIUM.


PAN_CONTROL_PRIORITY

public static int PAN_CONTROL_PRIORITY
Priority for the pan control. By default, this is MEDIUM.


SAMPLE_RATE_CONTROL_PRIORITY

public static int SAMPLE_RATE_CONTROL_PRIORITY
Priority for the sample-rate control. By default, this is LOW.


mixerInfo

public javax.sound.sampled.Mixer.Info mixerInfo
Standard information about the Mixer.


rank

public int rank
The Mixer's overall ranking. Maximum is 14, meaning fully functional. Minimum is 0, meaning not usable.


mixerExists

public boolean mixerExists
Indicates whether or not the Mixer exists.


minSampleRateOK

public boolean minSampleRateOK
Indicates whether or not the desired minimum sample-rate is compatible on the Mixer.


maxSampleRateOK

public boolean maxSampleRateOK
Indicates whether or not the desired maximum sample-rate is compatible on the Mixer.


lineCountOK

public boolean lineCountOK
Indicates whether or not the desired number of lines can be created on the Mixer.


gainControlOK

public boolean gainControlOK
Indicates whether or not gain controls are possible on the Mixer.


panControlOK

public boolean panControlOK
Indicates whether or not pan controls are possible on the Mixer.


sampleRateControlOK

public boolean sampleRateControlOK
Indicates whether or not sample-rate controls are possible on the Mixer.


minSampleRatePossible

public int minSampleRatePossible
Indicates the minimum sample rate possible for the Mixer, or -1 if no sample rate is possible.


maxSampleRatePossible

public int maxSampleRatePossible
Indicates the maximum sample rate possible for the Mixer, or -1 if no sample rate is possible.


maxLinesPossible

public int maxLinesPossible
Indicates the maximum number of output lines the Mixer can handle.

Constructor Detail

LibraryJavaSound.MixerRanking

public LibraryJavaSound.MixerRanking()
Constructor: Instantiates a Mixer ranking with default initial values.


LibraryJavaSound.MixerRanking

public LibraryJavaSound.MixerRanking(javax.sound.sampled.Mixer.Info i,
                                     int r,
                                     boolean e,
                                     boolean mnsr,
                                     boolean mxsr,
                                     boolean lc,
                                     boolean gc,
                                     boolean pc,
                                     boolean src)
Constructor: Instantiates a Mixer ranking with specified initial values.

Parameters:
i - Standard information about the mixer.
r - Overall ranking of the mixer.
e - Whether or not the mixer exists.
mnsr - Whether or not minimum sample-rate is compatible.
mxsr - Whether or not maximum sample-rate is compatible.
lc - Whether or not number of lines are compatible.
gc - Whether or not gain controls are compatible.
pc - Whether or not pan controls are compatible.
src - Whether or not sample-rate controls are compatible.
Method Detail

rank

public void rank(javax.sound.sampled.Mixer.Info i)
          throws LibraryJavaSound.Exception
Looks up the specified Mixer, tests its capabilities, and calculates its overall ranking.

Parameters:
i - Standard information about the mixer.
Throws:
LibraryJavaSound.Exception