Skip to content

Most visited

Recently visited

navigation

MediaCodecInfo.AudioCapabilities

public static final class MediaCodecInfo.AudioCapabilities
extends Object

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


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.

Inherited methods

From class java.lang.Object

Public methods

getBitrateRange

added in API level 21
Range<Integer> getBitrateRange ()

Returns the range of supported bitrates in bits/second.

Returns
Range<Integer>

getMaxInputChannelCount

added in API level 21
int getMaxInputChannelCount ()

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

Returns
int

getSupportedSampleRateRanges

added in API level 21
Range[]<Integer> getSupportedSampleRateRanges ()

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

Returns
Range[]<Integer>

getSupportedSampleRates

added in API level 21
int[] getSupportedSampleRates ()

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.

Returns
int[]

isSampleRateSupported

added in API level 21
boolean isSampleRateSupported (int sampleRate)

Query whether the sample rate is supported by the codec.

Parameters
sampleRate int
Returns
boolean
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.