pub struct EqualizerFeature { /* private fields */ }Expand description
Implements the Equalizer / 0x8310 feature.
Implementations§
Source§impl EqualizerFeature
impl EqualizerFeature
Sourcepub async fn get_eq_info(&self) -> Result<EqInfo, Hidpp20Error>
pub async fn get_eq_info(&self) -> Result<EqInfo, Hidpp20Error>
Retrieves the EQ table’s band count, gain range and storage capabilities.
Sourcepub async fn get_frequencies(
&self,
band_count: u8,
) -> Result<Vec<u16>, Hidpp20Error>
pub async fn get_frequencies( &self, band_count: u8, ) -> Result<Vec<u16>, Hidpp20Error>
Retrieves the frequency (Hz) of every band.
band_count is the value from EqInfo::band_count; the device returns
up to seven frequencies per response, so this pages through them until all
band_count are collected.
Sourcepub async fn get_frequency_gains(
&self,
location: GainLocation,
band_count: u8,
) -> Result<Vec<i8>, Hidpp20Error>
pub async fn get_frequency_gains( &self, location: GainLocation, band_count: u8, ) -> Result<Vec<i8>, Hidpp20Error>
Retrieves the active gain (dB) of every band from location.
band_count is the value from EqInfo::band_count (at most 15, the
number of gains a single response carries).
Sourcepub async fn set_frequency_gains(
&self,
persistence: GainPersistence,
gains: &[i8],
) -> Result<Vec<i8>, Hidpp20Error>
pub async fn set_frequency_gains( &self, persistence: GainPersistence, gains: &[i8], ) -> Result<Vec<i8>, Hidpp20Error>
Sets the per-band gains (dB) and returns the device’s echo of them.
gains holds one signed value per band (at most 15). The device rejects
out-of-range gains.
Sourcepub async fn get_mic_noise_reduction(&self) -> Result<bool, Hidpp20Error>
pub async fn get_mic_noise_reduction(&self) -> Result<bool, Hidpp20Error>
Retrieves whether hardware microphone noise reduction is enabled.
Sourcepub async fn set_mic_noise_reduction(
&self,
enabled: bool,
) -> Result<(), Hidpp20Error>
pub async fn set_mic_noise_reduction( &self, enabled: bool, ) -> Result<(), Hidpp20Error>
Enables or disables hardware microphone noise reduction.
Trait Implementations§
Source§impl Clone for EqualizerFeature
impl Clone for EqualizerFeature
Source§fn clone(&self) -> EqualizerFeature
fn clone(&self) -> EqualizerFeature
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more