(&mut self)
| 557 | } |
| 558 | } |
| 559 | Self::Mono => 1, |
| 560 | Self::Device => channels, |
| 561 | } |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | /// Input device reported by the capture backend. |
| 566 | #[derive(Clone, Debug, Default, PartialEq, Eq)] |
| 567 | pub struct MicDevice { |
| 568 | /// Backend name. Selection key for [`MicSettings::device`]. |
| 569 | pub name: String, |
| 570 | /// Menu label. Same as `name`, suffixed when two devices share a name. |
| 571 | pub label: String, |
| 572 | pub is_default: bool, |
| 573 | /// Default capture rate, `0` when the backend does not report one. |
| 574 | pub sample_rate: u32, |
| 575 | /// Default channel count, `0` when the backend does not report one. |
| 576 | pub channels: u16, |
| 577 | } |
no test coverage detected