-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
[windows] List all audio devices for Windows #338
Conversation
ac5a389
to
4ca5f0f
Compare
Previously, FAudio with `PLATFORM_WIN32` would only list the default audio device. This reworks the Faudio `PLATFORM_WIN32` code to enable access to every audio device on the system. In order to preserve the existing behavior (and Xaudio2 compabitility), the audio devices are re-ordered so the first device is always the default one. In addition, this properly populates the `DisplayName` field in `FAudioDeviceDetails`. Previously, it was set to the device GUID. Test: Local build with visualboyadvance-m
4ca5f0f
to
eb0b982
Compare
Friendly ping. Do you have any concern or issue with this PR? |
I don't personally, but this is code meant for Wine so I was hoping it would get reviewed over there... we may need to submit this as a patch to Wine first? Here's their local copy: https://gitlab.winehq.org/wine/wine/-/tree/master/libs/faudio?ref_type=heads |
Sorry, I missed the ping. I'll have a look. |
* Rework `FAudio_DefaultDeviceIndex` to return the Windows API error code and take the `defaultDeviceIndex` as parameter. * Change included headers for wine compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting back to me! I addressed your comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, with some slightly inconsistent style issues, though I don't know how picky I'm expected to be. I think squashing the changes together would also be better.
We can be pretty picky about style, but that can always come through as style fix commits - will get this in now since it's been waiting so patiently! |
Previously, FAudio with
PLATFORM_WIN32
would only list the default audio device. This reworks the FaudioPLATFORM_WIN32
code to enable access to every audio device on the system. In order to preserve the existing behavior (and Xaudio2 compabitility), the audio devices are re-ordered so the first device is always the default one.In addition, this properly populates the
DisplayName
field inFAudioDeviceDetails
. Previously, it was set to the device GUID.Test: Local build with visualboyadvance-m