update nix crate to v0.25
This commit is contained in:
parent
0a3e8c2208
commit
16617ceade
2 changed files with 13 additions and 8 deletions
|
|
@ -34,7 +34,7 @@ once_cell = "1.12"
|
|||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"))'.dependencies]
|
||||
alsa = "0.6"
|
||||
nix = "0.23"
|
||||
nix = "0.25"
|
||||
libc = "0.2.65"
|
||||
parking_lot = "0.12"
|
||||
jack = { version = "0.9", optional = true }
|
||||
|
|
@ -51,7 +51,7 @@ coreaudio-rs = { version = "0.10", default-features = false, features = ["audio_
|
|||
coreaudio-rs = { version = "0.10", default-features = false, features = ["audio_unit", "core_audio", "audio_toolbox"] }
|
||||
|
||||
[target.'cfg(target_os = "emscripten")'.dependencies]
|
||||
stdweb = { version = "0.1.3", default-features = false }
|
||||
stdweb = { version = "0.4.20", default-features = false }
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
|
||||
wasm-bindgen = { version = "0.2.58", optional = true }
|
||||
|
|
|
|||
|
|
@ -255,8 +255,12 @@ impl Device {
|
|||
.map_err(|e| (e, e.errno()));
|
||||
|
||||
let handle = match handle_result {
|
||||
Err((_, nix::errno::Errno::EBUSY)) => return Err(BuildStreamError::DeviceNotAvailable),
|
||||
Err((_, nix::errno::Errno::EINVAL)) => return Err(BuildStreamError::InvalidArgument),
|
||||
Err((_, alsa::nix::errno::Errno::EBUSY)) => {
|
||||
return Err(BuildStreamError::DeviceNotAvailable)
|
||||
}
|
||||
Err((_, alsa::nix::errno::Errno::EINVAL)) => {
|
||||
return Err(BuildStreamError::InvalidArgument)
|
||||
}
|
||||
Err((e, _)) => return Err(e.into()),
|
||||
Ok(handle) => handle,
|
||||
};
|
||||
|
|
@ -312,10 +316,11 @@ impl Device {
|
|||
.map_err(|e| (e, e.errno()));
|
||||
|
||||
let handle = match handle_result {
|
||||
Err((_, nix::errno::Errno::ENOENT)) | Err((_, nix::errno::Errno::EBUSY)) => {
|
||||
Err((_, alsa::nix::errno::Errno::ENOENT))
|
||||
| Err((_, alsa::nix::errno::Errno::EBUSY)) => {
|
||||
return Err(SupportedStreamConfigsError::DeviceNotAvailable)
|
||||
}
|
||||
Err((_, nix::errno::Errno::EINVAL)) => {
|
||||
Err((_, alsa::nix::errno::Errno::EINVAL)) => {
|
||||
return Err(SupportedStreamConfigsError::InvalidArgument)
|
||||
}
|
||||
Err((e, _)) => return Err(e.into()),
|
||||
|
|
@ -749,7 +754,7 @@ fn poll_descriptors_and_prepare_buffer(
|
|||
|
||||
let status = stream.channel.status()?;
|
||||
let avail_frames = match stream.channel.avail() {
|
||||
Err(err) if err.errno() == nix::errno::Errno::EPIPE => {
|
||||
Err(err) if err.errno() == alsa::nix::errno::Errno::EPIPE => {
|
||||
return Ok(PollDescriptorsFlow::XRun)
|
||||
}
|
||||
res => res,
|
||||
|
|
@ -832,7 +837,7 @@ fn process_output(
|
|||
}
|
||||
loop {
|
||||
match stream.channel.io_bytes().writei(buffer) {
|
||||
Err(err) if err.errno() == nix::errno::Errno::EPIPE => {
|
||||
Err(err) if err.errno() == alsa::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