Merge pull request #611 from est31/update_alsa
Update alsa and nix dependencies
This commit is contained in:
commit
0f279894f2
2 changed files with 8 additions and 13 deletions
|
|
@ -28,8 +28,8 @@ parking_lot = "0.11"
|
|||
lazy_static = "1.4"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))'.dependencies]
|
||||
alsa = "0.5"
|
||||
nix = "0.21"
|
||||
alsa = "0.6"
|
||||
nix = "0.23"
|
||||
libc = "0.2.65"
|
||||
parking_lot = "0.11"
|
||||
jack = { version = "0.7.0", optional = true }
|
||||
|
|
|
|||
|
|
@ -242,12 +242,8 @@ impl Device {
|
|||
.map_err(|e| (e, e.errno()));
|
||||
|
||||
let handle = match handle_result {
|
||||
Err((_, Some(nix::errno::Errno::EBUSY))) => {
|
||||
return Err(BuildStreamError::DeviceNotAvailable)
|
||||
}
|
||||
Err((_, Some(nix::errno::Errno::EINVAL))) => {
|
||||
return Err(BuildStreamError::InvalidArgument)
|
||||
}
|
||||
Err((_, nix::errno::Errno::EBUSY)) => return Err(BuildStreamError::DeviceNotAvailable),
|
||||
Err((_, nix::errno::Errno::EINVAL)) => return Err(BuildStreamError::InvalidArgument),
|
||||
Err((e, _)) => return Err(e.into()),
|
||||
Ok(handle) => handle,
|
||||
};
|
||||
|
|
@ -306,11 +302,10 @@ impl Device {
|
|||
.map_err(|e| (e, e.errno()));
|
||||
|
||||
let handle = match handle_result {
|
||||
Err((_, Some(nix::errno::Errno::ENOENT)))
|
||||
| Err((_, Some(nix::errno::Errno::EBUSY))) => {
|
||||
Err((_, nix::errno::Errno::ENOENT)) | Err((_, nix::errno::Errno::EBUSY)) => {
|
||||
return Err(SupportedStreamConfigsError::DeviceNotAvailable)
|
||||
}
|
||||
Err((_, Some(nix::errno::Errno::EINVAL))) => {
|
||||
Err((_, nix::errno::Errno::EINVAL)) => {
|
||||
return Err(SupportedStreamConfigsError::InvalidArgument)
|
||||
}
|
||||
Err((e, _)) => return Err(e.into()),
|
||||
|
|
@ -735,7 +730,7 @@ fn poll_descriptors_and_prepare_buffer(
|
|||
|
||||
let status = stream.channel.status()?;
|
||||
let avail_frames = match stream.channel.avail() {
|
||||
Err(err) if err.errno() == Some(nix::errno::Errno::EPIPE) => {
|
||||
Err(err) if err.errno() == nix::errno::Errno::EPIPE => {
|
||||
return Ok(PollDescriptorsFlow::XRun)
|
||||
}
|
||||
res => res,
|
||||
|
|
@ -818,7 +813,7 @@ fn process_output(
|
|||
}
|
||||
loop {
|
||||
match stream.channel.io_bytes().writei(buffer) {
|
||||
Err(err) if err.errno() == Some(nix::errno::Errno::EPIPE) => {
|
||||
Err(err) if err.errno() == nix::errno::Errno::EPIPE => {
|
||||
// buffer underrun
|
||||
// TODO: Notify the user of this.
|
||||
let _ = stream.channel.try_recover(err, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue