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

ALSA: Don't panic when handling invalid stream timestamps. #886

Merged
merged 1 commit into from
May 12, 2024

Conversation

jwagner
Copy link
Contributor

@jwagner jwagner commented May 12, 2024

For some reason the timestamps returned by ALSA when using the onboard ALC1220 are invalid (0) causing a panic in cpal, crashing my application.

I don't understand ALSA enough to judge why this is happening. This fix only addresses the symptoms by returning an Err instead of panicing. I couldn't find any reason why a panic would be necessary in this case, but might have missed something.

Copy link
Member

@est31 est31 left a comment

Choose a reason for hiding this comment

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

yeah if it can come from a buggy driver we shouldn't panic but should treat it like an error instead.

@est31 est31 merged commit 0246442 into RustAudio:master May 12, 2024
15 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.

2 participants