Methods Summary |
---|
public AudioPortConfig | activeConfig()Get currently active configuration of this audio port.
return mActiveConfig;
|
public AudioPortConfig | buildConfig(int samplingRate, int channelMask, int format, AudioGainConfig gain)Build a specific configuration of this audio port for use by methods
like AudioManager.connectAudioPatch().
return new AudioPortConfig(this, samplingRate, channelMask, format, gain);
|
public int[] | channelMasks()Get the list of supported channel mask configurations
(e.g AudioFormat.CHANNEL_OUT_STEREO)
Empty array if channel mask is not relevant for this audio port
return mChannelMasks;
|
public boolean | equals(java.lang.Object o)
if (o == null || !(o instanceof AudioPort)) {
return false;
}
AudioPort ap = (AudioPort)o;
return mHandle.equals(ap.handle());
|
public int[] | formats()Get the list of supported audio format configurations
(e.g AudioFormat.ENCODING_PCM_16BIT)
Empty array if format is not relevant for this audio port
return mFormats;
|
AudioGain | gain(int index)Get the gain descriptor at a given index
if (index < 0 || index >= mGains.length) {
return null;
}
return mGains[index];
|
public AudioGain[] | gains()Get the list of gain descriptors
Empty array if this port does not have gain control
return mGains;
|
AudioHandle | handle()
return mHandle;
|
public int | hashCode()
return mHandle.hashCode();
|
public int | role()Get the audio port role
return mRole;
|
public int[] | samplingRates()Get the list of supported sampling rates
Empty array if sampling rate is not relevant for this audio port
return mSamplingRates;
|
public java.lang.String | toString()
String role = Integer.toString(mRole);
switch (mRole) {
case ROLE_NONE:
role = "NONE";
break;
case ROLE_SOURCE:
role = "SOURCE";
break;
case ROLE_SINK:
role = "SINK";
break;
}
return "{mHandle: " + mHandle
+ ", mRole: " + role
+ "}";
|