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

ClosureProcessHandler API does not have a way to set a buffer_size callback #155

Open
Be-ing opened this issue Dec 10, 2021 · 3 comments
Open

Comments

@Be-ing
Copy link
Contributor

Be-ing commented Dec 10, 2021

ClosureProcessHandler::new creates a ProcessHandler with the provided process callback, however it does not provide any way to provide a buffer_size callback for the ProcessHandler it creates.

@Be-ing
Copy link
Contributor Author

Be-ing commented Dec 11, 2021

Interestingly Pipewire immediately calls the buffer size changed callback before processing. The value passed to the buffer size changed callback is different from Client::buffer_size before starting processing.

@wmedrano
Copy link
Member

wmedrano commented Dec 13, 2021

How about removing ClosureProcessHandler entirely and requiring only ProcessHandler?

We could also refactor ClosureProcessHandler to something like:

ClosureProcessHandler::new(T)
    .with_process_fn(t: &mut T, _: &Client, &ProcessScope)
    .with_buffer_size_fn(t: &mut T, :_ &Client, buffer_size: Frames)

@Be-ing
Copy link
Contributor Author

Be-ing commented Dec 13, 2021

How about removing ClosureProcessHandler entirely and requiring only ProcessHandler?

Sure. I don't think ClosureProcessHandler is necessary.

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