Android APIs
public static final class

MediaCodecInfo.AudioCapabilities

extends Object
java.lang.Object
   ↳ android.media.MediaCodecInfo.AudioCapabilities

Class Overview

A class that supports querying the audio capabilities of a codec.

Summary

Public Methods
Range<Integer> getBitrateRange()
Returns the range of supported bitrates in bits/second.
int getMaxInputChannelCount()
Returns the maximum number of input channels supported.
Range[]<Integer> getSupportedSampleRateRanges()
Returns the array of supported sample rate ranges.
int[] getSupportedSampleRates()
Returns the array of supported sample rates if the codec supports only discrete values.
boolean isSampleRateSupported(int sampleRate)
Query whether the sample rate is supported by the codec.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Range<Integer> getBitrateRange ()

Added in API level 21

Returns the range of supported bitrates in bits/second.

public int getMaxInputChannelCount ()

Added in API level 21

Returns the maximum number of input channels supported. The codec supports any number of channels between 1 and this maximum value.

public Range[]<Integer> getSupportedSampleRateRanges ()

Added in API level 21

Returns the array of supported sample rate ranges. The array is sorted in ascending order, and the ranges are distinct.

public int[] getSupportedSampleRates ()

Added in API level 21

Returns the array of supported sample rates if the codec supports only discrete values. Otherwise, it returns null. The array is sorted in ascending order.

public boolean isSampleRateSupported (int sampleRate)

Added in API level 21

Query whether the sample rate is supported by the codec.