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

Remove use of closure. #156

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Remove use of closure. #156

wants to merge 5 commits into from

Conversation

wmedrano
Copy link
Member

This encourages more people to handle buffer size changes.

///
/// struct MyHandler {};
/// impl jack::ProcessHandler for MyHandler {
/// fn buffer_size(&mut self, _: &jack::Client, _: jack::Frames) -> jack::Control {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// fn buffer_size(&mut self, _: &jack::Client, _: jack::Frames) -> jack::Control {
/// fn buffer_size(&mut self, _: &jack::Client, _: jack::Frames) -> jack::Control {
/// // resize data structures within your application

@@ -19,6 +19,9 @@ lazy_static! {

/// Defines the configuration for a certain port to JACK, ie 32 bit floating audio input, 8 bit raw
/// midi output, etc...
///
/// # Safety
/// JACK types are dynamically sized so its more difficult to get right.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean?

@Be-ing
Copy link
Contributor

Be-ing commented Dec 25, 2021

I like this change to simplify the API. I think it's good to have exactly one right way to do a task so users don't have to wonder which is the right one for them.

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.

None yet

2 participants