node: add xrun callback

Let alsa emit xrun callbacks.
Write the xrun stats to the activation area of the node so all
clients can read it.
This commit is contained in:
Wim Taymans 2019-08-22 13:23:48 +02:00
parent 570575f052
commit 6ad4adc194
8 changed files with 80 additions and 15 deletions

View file

@ -430,10 +430,17 @@ static int slave_reuse_buffer(void *data, uint32_t port_id, uint32_t buffer_id)
return res;
}
static int slave_xrun(void *data, uint64_t trigger, uint64_t delay, struct spa_pod *info)
{
struct impl *this = data;
return spa_node_call_xrun(&this->callbacks, trigger, delay, info);
}
static const struct spa_node_callbacks slave_node_callbacks = {
SPA_VERSION_NODE_CALLBACKS,
.ready = slave_ready,
.reuse_buffer = slave_reuse_buffer,
.xrun = slave_xrun,
};
static int impl_node_add_listener(void *object,