pub struct ResolvedAudioDevices {
pub devices: HashMap<String, ResolvedDevice>,
pub connect_warnings: Vec<String>,
pub disabled_route_indices: HashSet<usize>,
pub unavailable_inputs: HashSet<String>,
pub unavailable_outputs: HashSet<String>,
}Expand description
A fully resolved set of devices, ready for stream opening.
Fields§
§devices: HashMap<String, ResolvedDevice>§connect_warnings: Vec<String>Warnings about config-defined devices that are not currently connected.
disabled_route_indices: HashSet<usize>Route indices disabled because at least one endpoint device is not connected.
Route-referenced input aliases that are currently unavailable.
Route-referenced output aliases that are currently unavailable.
Implementations§
Source§impl ResolvedAudioDevices
impl ResolvedAudioDevices
Sourcepub fn missing_device_aliases(&self) -> HashSet<String>
pub fn missing_device_aliases(&self) -> HashSet<String>
All device aliases that are currently missing (not connected). Combines unavailable inputs and outputs.
Sourcepub fn route_enabled(&self, index: usize) -> bool
pub fn route_enabled(&self, index: usize) -> bool
Returns true when the route at index is active for stream construction.
Sourcepub fn active_route_count(&self, plan: &ValidatedConfig) -> usize
pub fn active_route_count(&self, plan: &ValidatedConfig) -> usize
Number of active routes after connectivity pruning.
Sourcepub fn input_device_names(&self) -> Vec<&str>
pub fn input_device_names(&self) -> Vec<&str>
All resolved device aliases that need an input stream.
Sourcepub fn output_device_names(&self) -> Vec<&str>
pub fn output_device_names(&self) -> Vec<&str>
All resolved device aliases that need an output stream.
Sourcepub fn connectivity_events(
&self,
next: &ResolvedAudioDevices,
plan: &ValidatedConfig,
) -> Vec<String>
pub fn connectivity_events( &self, next: &ResolvedAudioDevices, plan: &ValidatedConfig, ) -> Vec<String>
Human-readable device connectivity changes between two resolutions.
Trait Implementations§
Source§impl Clone for ResolvedAudioDevices
impl Clone for ResolvedAudioDevices
Source§fn clone(&self) -> ResolvedAudioDevices
fn clone(&self) -> ResolvedAudioDevices
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResolvedAudioDevices
impl RefUnwindSafe for ResolvedAudioDevices
impl Send for ResolvedAudioDevices
impl Sync for ResolvedAudioDevices
impl Unpin for ResolvedAudioDevices
impl UnsafeUnpin for ResolvedAudioDevices
impl UnwindSafe for ResolvedAudioDevices
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more