Skip to content

Commit

Permalink
Add some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-uk1 committed Apr 15, 2020
1 parent 290f464 commit 3c3349f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/host/alsa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ fn set_hw_params_from_format<'a>(
// 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);
}

Expand Down

0 comments on commit 3c3349f

Please sign in to comment.