ALSA: don't ignore POLLERR (#731)
This commit is contained in:
parent
adaa49de8b
commit
6c3d11b8f6
1 changed files with 6 additions and 1 deletions
|
|
@ -744,7 +744,12 @@ fn poll_descriptors_and_prepare_buffer(
|
||||||
return Ok(PollDescriptorsFlow::Return);
|
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::OUT => StreamType::Output,
|
||||||
alsa::poll::Flags::IN => StreamType::Input,
|
alsa::poll::Flags::IN => StreamType::Input,
|
||||||
_ => {
|
_ => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue