FileDocCategorySizeDatePackage
AudioPortConfig.javaAPI DocAndroid 5.1 API3223Thu Mar 12 22:22:30 GMT 2015android.media

AudioPortConfig

public class AudioPortConfig extends Object
An AudioPortConfig contains a possible configuration of an audio port chosen among all possible attributes described by an AudioPort. An AudioPortConfig is created by AudioPort.buildConfiguration(). AudioPorts are used to specify the sources and sinks of a patch created with AudioManager.connectAudioPatch(). Several specialized versions of AudioPortConfig exist to handle different categories of audio ports and their specific attributes: - AudioDevicePortConfig for input (e.g micropohone) and output devices (e.g speaker) - AudioMixPortConfig for input or output streams of the audio framework.
hide

Fields Summary
final AudioPort
mPort
private final int
mSamplingRate
private final int
mChannelMask
private final int
mFormat
private final AudioGainConfig
mGain
static final int
SAMPLE_RATE
static final int
CHANNEL_MASK
static final int
FORMAT
static final int
GAIN
int
mConfigMask
Constructors Summary
AudioPortConfig(AudioPort port, int samplingRate, int channelMask, int format, AudioGainConfig gain)


           
              
        mPort = port;
        mSamplingRate = samplingRate;
        mChannelMask = channelMask;
        mFormat = format;
        mGain = gain;
        mConfigMask = 0;
    
Methods Summary
public intchannelMask()
Channel mask configuration (e.g AudioFormat.CHANNEL_CONFIGURATION_STEREO).

        return mChannelMask;
    
public intformat()
Audio format configuration (e.g AudioFormat.ENCODING_PCM_16BIT).

        return mFormat;
    
public AudioGainConfiggain()
The gain configuration if this port supports gain control, null otherwise

see
AudioGainConfig.

        return mGain;
    
public AudioPortport()
Returns the audio port this AudioPortConfig is issued from.

        return mPort;
    
public intsamplingRate()
Sampling rate configured for this AudioPortConfig.

        return mSamplingRate;
    
public java.lang.StringtoString()

        return "{mPort:" + mPort
                + ", mSamplingRate:" + mSamplingRate
                + ", mChannelMask: " + mChannelMask
                + ", mFormat:" + mFormat
                + ", mGain:" + mGain
                + "}";