Enum Class BitsPerSample

java.lang.Object
java.lang.Enum<BitsPerSample>
org.refcodes.audio.BitsPerSample
All Implemented Interfaces:
Serializable, Comparable<BitsPerSample>, Constable

public enum BitsPerSample extends Enum<BitsPerSample>
The BitsPerSample enumeration defines some common bits/sample per channel constants.
  • Enum Constant Details

    • LOW_RES

      public static final BitsPerSample LOW_RES
      Low resolution of 8 bits/sample and channel.
    • HIGH_RES

      public static final BitsPerSample HIGH_RES
      High resolution of 16 bits/sample and channel.
  • Method Details

    • values

      public static BitsPerSample[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

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

      public int getBitCount()
      Returns the bits/sample per channel.
      Returns:
      The bits/sample for this BitsPerSample.
    • getByteCount

      public int getByteCount()
      Returns the bytes/sample per channel.
      Returns:
      The bytes/sample for this BitsPerSample.
    • getLowestResolution

      public static BitsPerSample getLowestResolution()
      Retrieves the lowest bits/sample resolution.
      Returns:
      The lowest resolution.
    • getHigestResolution

      public static BitsPerSample getHigestResolution()
      Retrieves the lowest bits/sample resolution.
      Returns:
      The highest resolution.
    • getNextHigherResolution

      public BitsPerSample getNextHigherResolution()
      Retrieves the next higher bits/sample or null if it is already the highest bits/sample.
      Returns:
      The next higher bits/sample or null if already the highest bits / sample.
    • getPreviousLowerResolution

      public BitsPerSample getPreviousLowerResolution()
      Retrieves the previous lower bits/sample or null if it is already the lowest bits/sample.
      Returns:
      The previous lower bits/sample or null if already the lowest bits/sample.