Package com.google.android.exoplayer2.trackselection

## Class DefaultTrackSelector.AudioTrackScore

- java.lang.Object
- - com.google.android.exoplayer2.trackselection.DefaultTrackSelector.AudioTrackScore

- All Implemented Interfaces:
    `Comparable<DefaultTrackSelector.AudioTrackScore>`
  Enclosing class:
    DefaultTrackSelector

      protected static final class DefaultTrackSelector.AudioTrackScore
      extends Object
      implements Comparable<DefaultTrackSelector.AudioTrackScore>

  Represents how well an audio track matches the selection `DefaultTrackSelector.Parameters`.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `boolean` | `isWithinConstraints` | Whether the provided format is within the parameter constraints.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AudioTrackScore​(Format format, DefaultTrackSelector.Parameters parameters, int formatSupport)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(DefaultTrackSelector.AudioTrackScore other)` | Compares this score with another.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### isWithinConstraints

          public final boolean isWithinConstraints

      Whether the provided format is within the parameter constraints. If `false`, the format should not be selected.

  - ### Constructor Detail

    - #### AudioTrackScore

          public AudioTrackScore​(Format format,
                                 DefaultTrackSelector.Parameters parameters,
                                 @Capabilities
                                 int formatSupport)

  - ### Method Detail

    - #### compareTo

          public int compareTo​(DefaultTrackSelector.AudioTrackScore other)

      Compares this score with another.
      Specified by:
        `compareTo` in interface `Comparable<DefaultTrackSelector.AudioTrackScore>`
      Parameters:
        `other` - The other score to compare to.
      Returns:
        A positive integer if this score is better than the other. Zero if they are equal. A negative integer if this score is worse than the other.