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 paNoDevice #150

Closed
wants to merge 2 commits into from
Closed

Handle paNoDevice #150

wants to merge 2 commits into from

Conversation

wmedrano
Copy link
Member

@wmedrano wmedrano commented Jan 4, 2017

#142

Added PA_NO_DEVICE to the possible errors portaudio errors.

@@ -1,14 +1,17 @@
//!
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed by rustfmt, revert?

}
Error::CanNotWriteToAnInputOnlyStream => {
"Portaudio cannot write to an input only stream"
}
Error::IncompatibleStreamHostApi => "The stream is not compatible with the host API",
Error::BadBufferPtr => "Invalid buffer",
}
}
}

impl ::num::FromPrimitive for Error {
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed by rustfmt, revert?

@wmedrano
Copy link
Member Author

wmedrano commented Jan 4, 2017

On second thought...
Maybe I should explicitly handle this in the return values for Pa_GetDefault...Device instead, that way it may be easier to debug if something else returns -1 for some reason.

@wmedrano wmedrano closed this Nov 27, 2017
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.

1 participant