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

handle cpal errors before starting playback #16

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

hejops
Copy link

@hejops hejops commented Sep 20, 2024

cpal's Device::default_output_config() may panic in edge cases, e.g. when using USB speakers. if this happens, playback should not be started.

A possibly relevant upstream issue (from 2022): RustAudio/cpal#680

Fixes #14

hejops and others added 5 commits September 19, 2024 12:53
this is a quick fix that was added because i don't use a desktop
environment on linux, and wasn't able get the file picker to appear,
despite having installed several xdg-desktop-portal-* packages
cpal's device.default_output_config() may panic in edge cases, e.g. when
using USB speakers. if this happens, playback should not be started.
@agourlay
Copy link
Owner

agourlay commented Sep 20, 2024

Thanks for the contribution 👍

Did you run into this error or is it more a preventive action?

Also this PR contains also your change with passing the file name to the CLI.
I like it for testing, I might split it later in a dedicated PR :)

@agourlay agourlay merged commit 943756e into agourlay:investigate-audio-buffer-sizing Sep 20, 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.

2 participants