impl-node: count missed wakeups as xruns

This commit is contained in:
Wim Taymans 2024-04-08 17:01:00 +02:00
parent 8ce5211a64
commit 34c8322986
2 changed files with 16 additions and 8 deletions

View file

@ -1804,12 +1804,17 @@ static inline uint32_t cycle_run(struct client *c)
}
break;
}
if (SPA_UNLIKELY(cmd > 1))
pw_log_info("%p: missed %"PRIu64" wakeups", c, cmd - 1);
activation->status = PW_NODE_ACTIVATION_AWAKE;
activation->awake_time = get_time_ns();
if (SPA_UNLIKELY(cmd > 1)) {
pw_log_info("%p: missed %"PRIu64" wakeups", c, cmd - 1);
activation->xrun_count += cmd - 1;
activation->xrun_time = activation->awake_time;
activation->xrun_delay = 0;
activation->max_delay = SPA_MAX(activation->max_delay, 0u);
}
if (SPA_UNLIKELY(c->first)) {
if (c->thread_init_callback)
c->thread_init_callback(c->thread_init_arg);