Fix compiler errors in wasapi backend after testing on windows
This commit is contained in:
parent
0b6e66d38e
commit
6164f83147
|
@ -409,7 +409,7 @@ impl Device {
|
|||
// Retrieve the `IAudioClient`.
|
||||
let lock = match self.ensure_future_audio_client() {
|
||||
Ok(lock) => lock,
|
||||
Err(e) if e.raw_os_error() == Some(AUDCLNT_E_DEVICE_INVALIDATED) => {
|
||||
Err(ref e) if e.raw_os_error() == Some(AUDCLNT_E_DEVICE_INVALIDATED) => {
|
||||
return Err(SupportedFormatsError::DeviceNotAvailable)
|
||||
}
|
||||
Err(e) => {
|
||||
|
@ -748,11 +748,11 @@ impl Devices {
|
|||
// can fail if the parameter is null, which should never happen
|
||||
check_result_backend_specific((*collection).GetCount(&mut count))?;
|
||||
|
||||
Devices {
|
||||
Ok(Devices {
|
||||
collection: collection,
|
||||
total_count: count,
|
||||
next_item: 0,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ fn check_result(result: HRESULT) -> Result<(), IoError> {
|
|||
|
||||
fn check_result_backend_specific(result: HRESULT) -> Result<(), BackendSpecificError> {
|
||||
match check_result(result) {
|
||||
Ok(()) => Ok(())
|
||||
Ok(()) => Ok(()),
|
||||
Err(err) => {
|
||||
let description = format!("{}", err);
|
||||
return BackendSpecificError { description }
|
||||
return Err(BackendSpecificError { description });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue