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

Allow WASAPI device switching #11438

Merged
merged 4 commits into from
Oct 1, 2018
Merged

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Oct 1, 2018

This simply follows the default audio device. We were already using eMultimedia, but technically MSDN says to use eConsole for games. Not sure it matters, I left it at eMultimedia... seems more logical as a user...

Anyway, this also adds support for direct IEEE_FLOAT format (non-extensible), which the DualShock 4 headphone jack uses. With these changes, switching devices works seemlessly.

Fixes #9805. Potentially, we could try detecting some property changes as a new device too, and also trigger this same logic - in case some headphone jacks operate that way and have different format params.

Sorry for all the refactoring in the last commit, was hard to split it up in any terribly useful way. It just calls HasDeviceChanged() and reinits the device inside the render loop.

Could also help #11367, perhaps.

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.7.0 milestone Oct 1, 2018
@hrydgard
Copy link
Owner

hrydgard commented Oct 1, 2018

Strange how a couple of old commits of mine show up here, did you pull them from some branch?

Anyway, this seems completely fine.

@hrydgard hrydgard merged commit 6690794 into hrydgard:master Oct 1, 2018
@unknownbrackets
Copy link
Collaborator Author

Yes, the branch mentioned in #9805, where you tried adding the notification client.

-[Unknown]

@unknownbrackets unknownbrackets deleted the wasapi-switch branch October 1, 2018 13:49
@hrydgard
Copy link
Owner

hrydgard commented Oct 1, 2018

Oh, completely forgot about that one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants