public class

AudioFormat

extends Object
java.lang.Object
   ↳ android.media.AudioFormat

Class Overview

The AudioFormat class is used to access a number of audio format and channel configuration constants. They are for instance used in __link AudioTrack} and __link AudioRecord}.

Summary

Constants
int CHANNEL_CONFIGURATION_DEFAULT Default audio channel configuration
int CHANNEL_CONFIGURATION_INVALID Invalid audio channel configuration
int CHANNEL_CONFIGURATION_MONO Mono audio configuration
int CHANNEL_CONFIGURATION_STEREO Stereo (2 channel) audio configuration
int ENCODING_DEFAULT Default audio data format
int ENCODING_INVALID Invalid audio data format
int ENCODING_PCM_16BIT Audio data format: PCM 16 bit per sample
int ENCODING_PCM_8BIT Audio data format: PCM 8 bit per sample
Public Constructors
AudioFormat()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int CHANNEL_CONFIGURATION_DEFAULT

Default audio channel configuration

Constant Value: 1 (0x00000001)

public static final int CHANNEL_CONFIGURATION_INVALID

Invalid audio channel configuration

Constant Value: 0 (0x00000000)

public static final int CHANNEL_CONFIGURATION_MONO

Mono audio configuration

Constant Value: 2 (0x00000002)

public static final int CHANNEL_CONFIGURATION_STEREO

Stereo (2 channel) audio configuration

Constant Value: 3 (0x00000003)

public static final int ENCODING_DEFAULT

Default audio data format

Constant Value: 1 (0x00000001)

public static final int ENCODING_INVALID

Invalid audio data format

Constant Value: 0 (0x00000000)

public static final int ENCODING_PCM_16BIT

Audio data format: PCM 16 bit per sample

Constant Value: 2 (0x00000002)

public static final int ENCODING_PCM_8BIT

Audio data format: PCM 8 bit per sample

Constant Value: 3 (0x00000003)

Public Constructors

public AudioFormat ()