mirror of
https://github.com/mii443/maudio-router.git
synced 2025-08-22 16:05:35 +00:00
11 lines
290 B
Rust
11 lines
290 B
Rust
use cpal::traits::{DeviceTrait, HostTrait};
|
|
|
|
use crate::args::Device;
|
|
|
|
pub fn device(device: Device) {
|
|
let host = cpal::default_host();
|
|
|
|
if device.list {
|
|
host.input_devices().unwrap().enumerate().for_each(|(i, device)| println!("{}: {}", i, device.name().unwrap()));
|
|
}
|
|
} |