ClosureProcessHandler API does not have a way to set a buffer_size callback
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.
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.
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)
How about removing ClosureProcessHandler entirely and requiring only ProcessHandler?
Sure. I don't think ClosureProcessHandler is necessary.