impl-node: fix timing for client-nodes using trigger
For client-nodes that use trigger, set the signal and wakeup time when they start the server node. Also set finish time before we resume the peers on the server. Client-nodes should really resume the peers directly without going through the server but this is something to improve later.
This commit is contained in:
parent
c23c27b566
commit
adb7559359
|
@ -1193,6 +1193,7 @@ static int node_ready(void *d, int status)
|
|||
a->state[0].status = status;
|
||||
spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
|
||||
a->signal_time = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||
a->awake_time = a->signal_time;
|
||||
|
||||
if (SPA_UNLIKELY(spa_system_eventfd_write(data_system, data->rtwritefd, 1) < 0))
|
||||
pw_log_warn("node %p: write failed %m", node);
|
||||
|
|
|
@ -1775,6 +1775,11 @@ again:
|
|||
if (SPA_UNLIKELY(node->driver && !node->driving))
|
||||
return 0;
|
||||
|
||||
if (!node->driver) {
|
||||
a->status = PW_NODE_ACTIVATION_FINISHED;
|
||||
a->finish_time = nsec;
|
||||
}
|
||||
|
||||
if (status & SPA_STATUS_HAVE_DATA) {
|
||||
spa_list_for_each(p, &node->rt.output_mix, rt.node_link)
|
||||
spa_node_process(p->mix);
|
||||
|
|
Loading…
Reference in New Issue