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

sysaudio: fix wasapi format selection + fix crash without capture device #1206

Merged
merged 2 commits into from May 12, 2024

Conversation

Andoryuuta
Copy link
Contributor

@Andoryuuta Andoryuuta commented May 11, 2024

This fixes a crash in the play-opus example on my Windows 11 machine, wherein no audio format is selected and crashes when trying to read from device.formats[0].
(Stacktrace for reference: https://gist.github.com/Andoryuuta/defa7bef64bfd5d14e913e5dd9b04284)

Additionally, while debugging this, I found that the example would also crash on startup when my microphone was not plugged in. Small drive-by fix for that is included in this MR as well.

This "works on my machine", but I'm not confident I understand the intentions of the previous code enough to say that this is completely correct.

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

Copy link
Contributor

@alichraghi alichraghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual issue comes from the fact that we temporary removed i24 format support but the following changes looks good!

@slimsag slimsag merged commit 73a1ea4 into hexops:main May 12, 2024
3 checks passed
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

3 participants