public class AudioGain extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MODE_CHANNELS
Bit of AudioGain.mode() field indicating that
each channel gain is controlled individually
|
static int |
MODE_JOINT
Bit of AudioGain.mode() field indicating that
all channel gains are controlled simultaneously
|
static int |
MODE_RAMP
Bit of AudioGain.mode() field indicating that
ramps can be applied when gain changes.
|
Modifier and Type | Method and Description |
---|---|
AudioGainConfig |
buildConfig(int mode,
int channelMask,
int[] values,
int rampDurationMs)
Build a valid gain configuration for this gain controller for use by
AudioPortDescriptor.setGain()
|
int |
channelMask()
Indicates for which channels the gain can be controlled
(e.g.
|
int |
defaultValue()
Default gain value in millibel
|
int |
maxValue()
Maximum gain value in millibel
|
int |
minValue()
Minimum gain value in millibel
|
int |
mode()
Bit field indicating supported modes of operation
|
int |
rampDurationMaxMs()
Maximum ramp duration in milliseconds
0 if MODE_RAMP not set
|
int |
rampDurationMinMs()
Minimum ramp duration in milliseconds
0 if MODE_RAMP not set
|
int |
stepValue()
Granularity of gain control in millibel
|
public static final int MODE_JOINT
public static final int MODE_CHANNELS
public static final int MODE_RAMP
public int mode()
public int channelMask()
public int minValue()
public int maxValue()
public int defaultValue()
public int stepValue()
public int rampDurationMinMs()
public int rampDurationMaxMs()
public AudioGainConfig buildConfig(int mode, int channelMask, int[] values, int rampDurationMs)
mode:
- desired mode of operationchannelMask:
- channels of which the gain should be modified.values:
- gain values for each channels.rampDurationMs:
- ramp duration if mode MODE_RAMP is set.
ignored if MODE_JOINT.