[pulseaudio-discuss] [PATCH] Add support of callbacks for operation cancelation

Tanu Kaskinen tanuk at iki.fi
Fri Jan 4 04:50:50 PST 2013


[Please don't top-post, thanks.]

On Thu, 2013-01-03 at 15:27 -0500, Favonia wrote:
> Thanks. I'm still interested because we're working on a full Haskell
> binding for PulseAudio (in a very, very slow pace, though). I assume
> you're talking about an interface similar to
> pa_stream_set_state_callback(). If so, it looks more consistent with
> the current PulseAudio API. In either way we can deal with it much
> more efficiently than the old API.

Ok, would you be willing to write an updated patch?

Some feedback about the first version:

 * It would be better to call the callback from operation_set_state
rather than from context_unlink().

 * pa_operation_new_with_cancel_callback() seems unnecessary. There's no
need to initialize the callback to anything else than NULL when creating
a new operation object.

 * Every new function in the public API need to be added to
src/map-file, otherwise applications won't be able to use the function
(linking will fail).

-- 
Tanu



More information about the pulseaudio-discuss mailing list