node: add a clock XRUN_RECOVER flag

Make a new flag that is set when the process function is called because
of a recover from a graph xrun.

Use this flag in the freewheel driver to detect a recover and to avoid
scheduling a new timeout. We should schedule a new timeout only when the
process function was called after completion.

This fixes export in ardour some more when the initial driver timeout
didn't complete (when, for example, some nodes were still starting up).
This commit is contained in:
Wim Taymans 2024-07-12 12:21:59 +02:00
parent 73d41308b1
commit 42096de3cc
3 changed files with 6 additions and 2 deletions

View file

@ -524,7 +524,8 @@ static int impl_node_process(void *object)
spa_return_val_if_fail(this != NULL, -EINVAL);
spa_log_trace(this->log, "process %d", this->props.freewheel);
if (this->props.freewheel) {
if (this->props.freewheel &&
!SPA_FLAG_IS_SET(this->position->clock.flags, SPA_IO_CLOCK_FLAG_XRUN_RECOVER)) {
this->next_time = gettime_nsec(this, this->timer_clockid);
set_timeout(this, this->next_time);
}