audio: Add new dither-threshold converter configuration

This commit is contained in:
Sebastian Dröge 2022-03-15 15:29:46 +02:00
parent 3080c37897
commit fe7850720c

View file

@ -157,6 +157,22 @@ impl AudioConverterConfig {
})
.unwrap_or_else(Vec::new)
}
#[cfg(any(feature = "v1_22", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
pub fn set_dither_threshold(&mut self, v: u32) {
self.0.set("GstAudioConverter.dither-threshold", &v);
}
#[cfg(any(feature = "v1_22", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
#[doc(alias = "get_dither_threshold")]
pub fn dither_threshold(&self) -> u32 {
self.0
.get_optional("GstAudioConverter.dither-threshold")
.expect("Wrong type")
.unwrap_or(20)
}
}
#[cfg(test)]