Skip to content

Commit

Permalink
ALSA: don't ignore POLLERR (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
codepainters authored Feb 22, 2024
1 parent adaa49d commit 6c3d11b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/host/alsa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,12 @@ fn poll_descriptors_and_prepare_buffer(
return Ok(PollDescriptorsFlow::Return);
}

let stream_type = match stream.channel.revents(&descriptors[1..])? {
let revents = stream.channel.revents(&descriptors[1..])?;
if revents.contains(alsa::poll::Flags::ERR) {
let description = String::from("`alsa::poll()` returned POLLERR");
return Err(BackendSpecificError { description });
}
let stream_type = match revents {
alsa::poll::Flags::OUT => StreamType::Output,
alsa::poll::Flags::IN => StreamType::Input,
_ => {
Expand Down

0 comments on commit 6c3d11b

Please sign in to comment.