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

Panic if no default input device is found #142

Open
Bun opened this issue Aug 5, 2016 · 1 comment
Open

Panic if no default input device is found #142

Bun opened this issue Aug 5, 2016 · 1 comment

Comments

@Bun
Copy link

Bun commented Aug 5, 2016

The function default_input_device causes a panic when no input device is found. The function Pa_GetDefaultInputDevice returns -1 (paNoDevice), which it then attempts to convert to an Error, which panics at the unwrap.

The same issue likely exists for default_output_device as well.

A fix would be to include -1 explicitly in Error, or to handle the -1 value.

@EddyLuten
Copy link

EddyLuten commented Feb 14, 2017

Confirmed that the same happens for default_output_device when running any of the examples on Ubuntu 16.10.

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

No branches or pull requests

2 participants