Update windows and alsa dependencies (#812)
This commit is contained in:
parent
efa0c7af6b
commit
76b04065cf
3 changed files with 13 additions and 9 deletions
|
|
@ -25,8 +25,9 @@ use windows::Win32::Foundation;
|
|||
use windows::Win32::Media::Audio::IAudioRenderClient;
|
||||
use windows::Win32::Media::{Audio, KernelStreaming, Multimedia};
|
||||
use windows::Win32::System::Com;
|
||||
use windows::Win32::System::Com::{StructuredStorage, STGM_READ, VT_LPWSTR};
|
||||
use windows::Win32::System::Com::{StructuredStorage, STGM_READ};
|
||||
use windows::Win32::System::Threading;
|
||||
use windows::Win32::System::Variant::VT_LPWSTR;
|
||||
|
||||
use super::stream::{AudioClientFlow, Stream, StreamInner};
|
||||
use crate::{traits::DeviceTrait, BuildStreamError, StreamError};
|
||||
|
|
|
|||
|
|
@ -149,8 +149,7 @@ impl Stream {
|
|||
fn push_command(&self, command: Command) -> Result<(), SendError<Command>> {
|
||||
self.commands.send(command)?;
|
||||
unsafe {
|
||||
let result = Threading::SetEvent(self.pending_scheduled_event);
|
||||
assert_ne!(result, false);
|
||||
Threading::SetEvent(self.pending_scheduled_event).unwrap();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -162,7 +161,7 @@ impl Drop for Stream {
|
|||
if self.push_command(Command::Terminate).is_ok() {
|
||||
self.thread.take().unwrap().join().unwrap();
|
||||
unsafe {
|
||||
Foundation::CloseHandle(self.pending_scheduled_event);
|
||||
let _ = Foundation::CloseHandle(self.pending_scheduled_event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -185,7 +184,7 @@ impl Drop for StreamInner {
|
|||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
Foundation::CloseHandle(self.event);
|
||||
let _ = Foundation::CloseHandle(self.event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -243,8 +242,11 @@ fn wait_for_handle_signal(handles: &[Foundation::HANDLE]) -> Result<usize, Backe
|
|||
)
|
||||
};
|
||||
if result == Foundation::WAIT_FAILED {
|
||||
let err = unsafe { Foundation::GetLastError() };
|
||||
let description = format!("`WaitForMultipleObjectsEx failed: {}", err.0);
|
||||
let err = match unsafe { Foundation::GetLastError() } {
|
||||
Ok(()) => windows::core::Error::OK,
|
||||
Err(err) => err,
|
||||
};
|
||||
let description = format!("`WaitForMultipleObjectsEx failed: {}", err);
|
||||
let err = BackendSpecificError { description };
|
||||
return Err(err);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue