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

@ -886,8 +886,10 @@ static int impl_node_process(void *object)
if (status & SPA_STATUS_NEED_DATA) {
status = spa_node_process(this->follower);
if (!(status & SPA_STATUS_HAVE_DATA))
if (!(status & SPA_STATUS_HAVE_DATA)) {
spa_node_call_xrun(&this->callbacks, 0, 0, NULL);
break;
}
}
}
}