Skip to main content

AsyncGainControl

Trait AsyncGainControl 

Source
pub trait AsyncGainControl: AsyncDeviceInfo {
    // Required methods
    fn async_gain_elements(
        &self,
        direction: Direction,
        channel: usize,
    ) -> impl Future<Output = Result<Vec<String>, Error>> + MaybeSend + '_;
    fn async_set_gain(
        &self,
        direction: Direction,
        channel: usize,
        gain: f64,
    ) -> impl Future<Output = Result<(), Error>> + MaybeSend + '_;
    fn async_gain(
        &self,
        direction: Direction,
        channel: usize,
    ) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + '_;
    fn async_gain_range(
        &self,
        direction: Direction,
        channel: usize,
    ) -> impl Future<Output = Result<Range, Error>> + MaybeSend + '_;
    fn async_set_gain_element<'a>(
        &'a self,
        direction: Direction,
        channel: usize,
        name: &'a str,
        gain: f64,
    ) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a;
    fn async_gain_element<'a>(
        &'a self,
        direction: Direction,
        channel: usize,
        name: &'a str,
    ) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + 'a;
    fn async_gain_element_range<'a>(
        &'a self,
        direction: Direction,
        channel: usize,
        name: &'a str,
    ) -> impl Future<Output = Result<Range, Error>> + MaybeSend + 'a;
}
Expand description

Asynchronous gain control capability.

Required Methods§

Source

fn async_gain_elements( &self, direction: Direction, channel: usize, ) -> impl Future<Output = Result<Vec<String>, Error>> + MaybeSend + '_

Return named gain elements available for the channel.

Source

fn async_set_gain( &self, direction: Direction, channel: usize, gain: f64, ) -> impl Future<Output = Result<(), Error>> + MaybeSend + '_

Set overall channel gain in dB.

Source

fn async_gain( &self, direction: Direction, channel: usize, ) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + '_

Return overall channel gain in dB, if available.

Source

fn async_gain_range( &self, direction: Direction, channel: usize, ) -> impl Future<Output = Result<Range, Error>> + MaybeSend + '_

Return supported overall channel gain range in dB.

Source

fn async_set_gain_element<'a>( &'a self, direction: Direction, channel: usize, name: &'a str, gain: f64, ) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a

Set a named gain element in dB.

Source

fn async_gain_element<'a>( &'a self, direction: Direction, channel: usize, name: &'a str, ) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + 'a

Return a named gain element in dB, if available.

Source

fn async_gain_element_range<'a>( &'a self, direction: Direction, channel: usize, name: &'a str, ) -> impl Future<Output = Result<Range, Error>> + MaybeSend + 'a

Return supported range in dB for a named gain element.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§