adds docs for BufferSize and fixes buffersize bugs in emscripten and alsa

This commit is contained in:
JoshuaBatty 2020-07-14 13:15:32 +02:00
parent 271cc34f3f
commit 4ce12a69b9
3 changed files with 8 additions and 8 deletions

View file

@ -905,13 +905,6 @@ fn set_hw_params_from_format<'a>(
BufferSize::Default => (),
}
// If this isn't set manually a overlarge buffer may be used causing audio delay
let mut hw_params_copy = hw_params.clone();
if let Err(_) = hw_params.set_buffer_time_near(100_000, alsa::ValueOr::Nearest) {
// Swap out the params with errors for a snapshot taken before the error was introduced.
mem::swap(&mut hw_params_copy, &mut hw_params);
}
pcm_handle.hw_params(&hw_params)?;
Ok(hw_params)