RustAudio / rust-portaudio

PortAudio bindings and wrappers for Rust.
MIT License
373 stars 89 forks source link

Added "NoDevice" to the list of Portaudio errors #160

Closed JWorthe closed 7 years ago

JWorthe commented 7 years ago

This is the error that portaudio returns if you ask for the default device, but the system doesn't have a default device.

Before this change, Portaudio returning NoDevice would result in a panic. Now, it will result in the new error being returned.

I also updated the examples to avoid panicking, and rather print the error message and exit gracefully.

142