Ensure all crates are formatted correctly, not just cpal itself.

This commit is contained in:
mitchmindtree 2020-01-21 14:18:16 +01:00
parent ca255772fd
commit 7e846b47ad
8 changed files with 2567 additions and 880 deletions

View file

@ -38,8 +38,12 @@ fn main() {
for name in asio.driver_names() {
println!("Driver: {:?}", name);
let driver = asio.load_driver(&name).expect("failed to load driver");
let channels = driver.channels().expect("failed to retrieve channel counts");
let sample_rate = driver.sample_rate().expect("failed to retrieve sample rate");
let channels = driver
.channels()
.expect("failed to retrieve channel counts");
let sample_rate = driver
.sample_rate()
.expect("failed to retrieve sample rate");
let in_fmt = Format {
channels: channels.ins as _,
sample_rate: SampleRate(sample_rate as _),

View file

@ -5,7 +5,13 @@ fn main() {
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"));
println!(
" Channels: {:?}",
driver.channels().expect("failed to get channels")
);
println!(
" Sample rate: {:?}",
driver.sample_rate().expect("failed to get sample rate")
);
}
}