stream: somewhat implement drain better

Abuse the xrun callback in the adapter to emit the drained signal until
almost all data left the resampler. This needs more work with a proper
signal and a buffer flag to signal the drain.
This commit is contained in:
Wim Taymans 2020-04-02 17:46:50 +02:00
parent ce39c6200d
commit 22e590c7cc
3 changed files with 25 additions and 7 deletions

View file

@ -1131,6 +1131,8 @@ static int node_xrun(void *d, uint64_t trigger, uint64_t delay, struct spa_pod *
pw_log_debug("node %p: XRun! count:%u time:%"PRIu64" delay:%"PRIu64" max:%"PRIu64,
node, a->xrun_count, trigger, delay, a->max_delay);
pw_context_driver_emit_xrun(data->context, node);
return 0;
}