cpal/asio-sys/examples/test.rs
mitchmindtree efe683133c Refactor asio-sys to use less global state and more RAII
The asio-sys examples have been tested and still work nicely. The CPAL
asio host has not yet been updated for these changes.
2019-07-05 05:51:29 +10:00

11 lines
434 B
Rust

extern crate asio_sys as sys;
fn main() {
let asio = sys::Asio::new();
for driver in asio.driver_names() {
println!("Driver: {}", driver);
let driver = asio.load_driver(&driver).expect("failed to load drivers");
println!(" Channels: {:?}", driver.channels().expect("failed to get channels"));
println!(" Sample rate: {:?}", driver.sample_rate().expect("failed to get sample rate"));
}
}