FileDocCategorySizeDatePackage
AudioGainConfig.javaAPI DocAndroid 5.1 API2364Thu Mar 12 22:22:30 GMT 2015android.media

AudioGainConfig

public class AudioGainConfig extends Object
The AudioGainConfig is used by APIs setting or getting values on a given gain controller. It contains a valid configuration (value, channels...) for a gain controller exposed by an audio port.
see
AudioGain
see
AudioPort
hide

Fields Summary
AudioGain
mGain
private final int
mIndex
private final int
mMode
private final int
mChannelMask
private final int[]
mValues
private final int
mRampDurationMs
Constructors Summary
AudioGainConfig(int index, AudioGain gain, int mode, int channelMask, int[] values, int rampDurationMs)

        mIndex = index;
        mGain = gain;
        mMode = mode;
        mChannelMask = channelMask;
        mValues = values;
        mRampDurationMs = rampDurationMs;
    
Methods Summary
public intchannelMask()
Indicates for which channels the gain is set. See {@link AudioFormat#CHANNEL_OUT_STEREO}, {@link AudioFormat#CHANNEL_OUT_MONO} ...

        return mChannelMask;
    
intindex()
get the index of the parent gain. frameworks use only.

        return mIndex;
    
public intmode()
Bit field indicating requested modes of operation. See {@link AudioGain#MODE_JOINT}, {@link AudioGain#MODE_CHANNELS}, {@link AudioGain#MODE_RAMP}

        return mMode;
    
public intrampDurationMs()
Ramp duration in milliseconds. N/A if mode() does not specify MODE_RAMP.

        return mRampDurationMs;
    
public int[]values()
Gain values for each channel in the order of bits set in channelMask() from LSB to MSB

        return mValues;