Fix some typo and warnings

This commit is contained in:
Rémi Lauzier 2021-06-28 11:55:15 -04:00
parent 5bbfa4992e
commit ba462dad18
No known key found for this signature in database
GPG key ID: D4B9ECD143336C1D
28 changed files with 98 additions and 98 deletions

View file

@ -3,7 +3,7 @@ use super::parking_lot::Mutex;
use super::{Device, DeviceHandles};
use {BackendSpecificError, DevicesError};
/// ALSA implementation for `Devices`.
/// ALSA's implementation for `Devices`.
pub struct Devices {
hint_iter: alsa::device_name::HintIter,
}

View file

@ -129,7 +129,7 @@ impl TriggerSender {
fn wakeup(&self) {
let buf = 1u64;
let ret = unsafe { libc::write(self.0, &buf as *const u64 as *const _, 8) };
assert!(ret == 8);
assert_eq!(ret, 8);
}
}
@ -459,7 +459,7 @@ impl Device {
return Err(DefaultStreamConfigError::DeviceNotAvailable);
}
Err(SupportedStreamConfigsError::InvalidArgument) => {
// this happens sometimes when querying for input and output capabilities but
// this happens sometimes when querying for input and output capabilities, but
// the device supports only one
return Err(DefaultStreamConfigError::StreamTypeNotSupported);
}
@ -997,7 +997,7 @@ fn set_hw_params_from_format(
}
BufferSize::Default => {
// These values together represent a moderate latency and wakeup interval.
// Without them we are at the mercy of the device
// Without them, we are at the mercy of the device
hw_params.set_period_time_near(25_000, alsa::ValueOr::Nearest)?;
hw_params.set_buffer_time_near(100_000, alsa::ValueOr::Nearest)?;
}