gets buffersize range and allows to set buffersize for alsa

This commit is contained in:
JoshuaBatty 2020-05-21 09:41:23 +02:00
parent 7081c3bbd6
commit d72b546dca
5 changed files with 46 additions and 27 deletions

View file

@ -9,7 +9,7 @@ fn main() -> Result<(), anyhow::Error> {
.default_output_device()
.expect("failed to find a default output device");
let config = device.default_output_config()?;
println!("{:#?}", &config);
match config.sample_format() {
cpal::SampleFormat::F32 => run::<f32>(&device, &config.into())?,
cpal::SampleFormat::I16 => run::<i16>(&device, &config.into())?,