pub struct GainController1 {
pub mode: GainControllerMode,
pub target_level_dbfs: u8,
pub compression_gain_db: u8,
pub enable_limiter: bool,
pub analog_gain_controller: Option<AnalogGainController>,
}Expand description
Enables automatic gain control (AGC) functionality. The automatic gain control (AGC) component brings the signal to an appropriate range. This is done by applying a digital gain directly and, in the analog mode, prescribing an analog gain to be applied at the audio HAL. Recommended to be enabled on the client-side.
Fields§
§mode: GainControllerModeAGC mode.
target_level_dbfs: u8Sets the target peak level (or envelope) of the AGC in dBFs (decibels from digital full-scale). The convention is to use positive values. For instance, passing in a value of 3 corresponds to -3 dBFs, or a target level 3 dB below full-scale. Limited to [0, 31].
compression_gain_db: u8Sets the maximum gain the digital compression stage may apply, in dB. A higher number corresponds to greater compression, while a value of 0 will leave the signal uncompressed. Limited to [0, 90].
For updates after APM setup, the C++ upstream suggests using RuntimeSetting instead (which is not yet exposed in the Rust wrapper).
enable_limiter: boolWhen enabled, the compression stage will hard limit the signal to the target level. Otherwise, the signal will be compressed but not limited above the target level.
analog_gain_controller: Option<AnalogGainController>Analog gain controller configuration.
Trait Implementations§
Source§impl Clone for GainController1
impl Clone for GainController1
Source§fn clone(&self) -> GainController1
fn clone(&self) -> GainController1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GainController1
impl Debug for GainController1
Source§impl Default for GainController1
impl Default for GainController1
Source§impl<'de> Deserialize<'de> for GainController1where
GainController1: Default,
impl<'de> Deserialize<'de> for GainController1where
GainController1: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for GainController1
impl JsonSchema for GainController1
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more