pub unsafe extern "C" fn pw_stream_trigger_process(
stream: *mut pw_stream,
) -> c_int
Expand description
Trigger a push/pull on the stream. One iteration of the graph will be scheduled when the stream is driving according to \ref pw_stream_is_driving(). If it successfully finishes, process() will be called and the trigger_done event will be emitted. It is possible for the graph iteration to not finish, so pw_stream_trigger_process() needs to be called again even if process() and trigger_done is not called.
If there is a deadline after which the stream will have xrun, pw_stream_trigger_process() should be called then, whether or not process()/trigger_done has been called. Sound hardware will xrun if there is any delay in audio processing, so the ALSA plugin triggers the graph every quantum to ensure audio keeps flowing. Drivers that do not have a deadline, such as the freewheel driver, should use a timeout to ensure that forward progress keeps being made. A reasonable choice of deadline is three times the quantum: if the graph is taking 3x longer than normal, it is likely that it is hung and should be retriggered.
Streams that are not drivers according to \ref pw_stream_is_driving() can also call this method. The result is that a RequestProcess event is sent to the driver. If the graph is lazy scheduling according to \ref pw_stream_is_lazy(), this might result in a graph cycle by the driver. If the graph is not lazy scheduling and the stream is not a driver, this method will have no effect.
RT safe.
Since 0.3.34