AudioPortConfigpublic 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. |
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 int | channelMask()Channel mask configuration (e.g AudioFormat.CHANNEL_CONFIGURATION_STEREO).
return mChannelMask;
| public int | format()Audio format configuration (e.g AudioFormat.ENCODING_PCM_16BIT).
return mFormat;
| public AudioGainConfig | gain()The gain configuration if this port supports gain control, null otherwise
return mGain;
| public AudioPort | port()Returns the audio port this AudioPortConfig is issued from.
return mPort;
| public int | samplingRate()Sampling rate configured for this AudioPortConfig.
return mSamplingRate;
| public java.lang.String | toString()
return "{mPort:" + mPort
+ ", mSamplingRate:" + mSamplingRate
+ ", mChannelMask: " + mChannelMask
+ ", mFormat:" + mFormat
+ ", mGain:" + mGain
+ "}";
|
|