pub struct ControlMonitor<'d, const N: usize> { /* private fields */ }Expand description
Control status change monitor.
Await Self::changed, then read the updated settings. Channels are numbered from 0 in
stream order.
Implementations§
Source§impl<'d, const N: usize> ControlMonitor<'d, N>
impl<'d, const N: usize> ControlMonitor<'d, N>
Sourcepub fn line_out_volume(&self, channel: usize) -> Option<Volume>
pub fn line_out_volume(&self, channel: usize) -> Option<Volume>
A line out channel’s volume with the master applied. None without a Feature Unit, for
a channel past the last, or if neither the channel nor the master has controls.
Sourcepub fn line_in_volume(&self, channel: usize) -> Option<Volume>
pub fn line_in_volume(&self, channel: usize) -> Option<Volume>
A line in channel’s volume with the master applied, as Self::line_out_volume.
Sourcepub fn sample_rate_hz(&self) -> u32
pub fn sample_rate_hz(&self) -> u32
Get the sample rate in Hz. Before the host sets one, and again after a bus reset, it is the first advertised rate.
Sourcepub fn set_clock_valid(&self, valid: bool)
pub fn set_clock_valid(&self, valid: bool)
Set the clock validity reported to the host (valid by default). Report the clock as invalid while it doesn’t run at the selected rate, for example during a rate change.
Sourcepub fn set_line_out_volume(&self, channel: usize, volume: Volume)
pub fn set_line_out_volume(&self, channel: usize, volume: Volume)
Set a line out channel’s own volume (not the master’s) from the device side, for
example from a front panel. The host is told through the interrupt endpoint, if there is
one; Self::changed doesn’t fire. Without a mute control, Volume::Muted sets the
volume to silence. Out-of-range volumes are clamped to the advertised range.
Sourcepub fn set_line_in_volume(&self, channel: usize, volume: Volume)
pub fn set_line_in_volume(&self, channel: usize, volume: Volume)
Set a line in channel’s own volume from the device side, as Self::set_line_out_volume.