Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASAPI: Improve how default devices are created to support automatic stream routing #754

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed merge conflicts
sidit77 committed May 2, 2023
commit 7e82d99bfaa8036cf6e7c7d214254014ad050139
8 changes: 4 additions & 4 deletions src/host/wasapi/device.rs
Original file line number Diff line number Diff line change
@@ -344,9 +344,9 @@ fn retrieve_result(
impl Audio::IActivateAudioInterfaceCompletionHandler_Impl for CompletionHandler {
fn ActivateCompleted(
&self,
operation: &Option<Audio::IActivateAudioInterfaceAsyncOperation>,
operation: Option<&Audio::IActivateAudioInterfaceAsyncOperation>,
) -> WinResult<()> {
let result = retrieve_result(operation.as_ref().unwrap());
let result = retrieve_result(operation.unwrap());
let _ = self.0.send(result);
Ok(())
}
@@ -358,8 +358,8 @@ unsafe fn ActivateAudioInterfaceSync<P0, T>(
activationparams: Option<*const PROPVARIANT>,
) -> WinResult<T>
where
P0: Into<::windows::core::InParam<PCWSTR>>,
T: Interface,
P0: windows::core::IntoParam<PCWSTR>,
T: Interface + ComInterface,
{
let (sender, receiver) = std::sync::mpsc::channel();
let completion: Audio::IActivateAudioInterfaceCompletionHandler =