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

Invalid error returned for paNoDevice in DefaultInputDevice and DefaultOutputDevice #35

Closed
delthas opened this issue Apr 18, 2020 · 0 comments

Comments

@delthas
Copy link

delthas commented Apr 18, 2020

When there are no input devices or output devices on the system, DefaultInputDevice (DefaultOutputDevice) calls C.Pa_GetDefaultInputDevice (C.Pa_GetDefaultInputDevice) which returns paNoDevice.

paNoDevice is < 0 so the wrappers return newError(C.PaError(i)); however paNoDevice is not a PaError. It's just a special number returned when there's no device.

Later when this error is printed it prints Invalid error code because paNoDevice is not a valid error code.

This error should not be wrapped under a portaudio.Error but probably instead just return some constant portaudio.errNoDevice.

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

1 participant