vois/src/audio/devices.rs
loki5512344 b0d685a110 Initial release: real-time voice changer in pure Rust
Phase-vocoder pitch/formant shifting, 12 presets, effect chain,
noise gate, WAV recording, full-screen TUI (arrow/mouse control)
and a built-in PipeWire/PulseAudio virtual mic (vois.rs).
GPL-3.0-or-later.
2026-08-02 17:54:50 +02:00

18 lines
475 B
Rust

use anyhow::Result;
use cpal::traits::{DeviceTrait, HostTrait};
pub fn print_all() -> Result<()> {
let host = cpal::default_host();
println!("Input devices:");
for device in host.input_devices()? {
println!(" {}", device.name().unwrap_or_else(|_| "<unnamed>".into()));
}
println!("Output devices:");
for device in host.output_devices()? {
println!(" {}", device.name().unwrap_or_else(|_| "<unnamed>".into()));
}
Ok(())
}