mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: implement set_io and handle position io
Use position io for deciding the size of the output buffers in alsasrc
This commit is contained in:
parent
4aab226047
commit
2206deb3e8
4 changed files with 39 additions and 12 deletions
|
|
@ -159,7 +159,23 @@ static int impl_node_enum_params(struct spa_node *node,
|
|||
|
||||
static int impl_node_set_io(struct spa_node *node, uint32_t id, void *data, size_t size)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
struct state *this;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
this = SPA_CONTAINER_OF(node, struct state, node);
|
||||
|
||||
switch (id) {
|
||||
case SPA_IO_Clock:
|
||||
this->clock = data;
|
||||
break;
|
||||
case SPA_IO_Position:
|
||||
this->position = data;
|
||||
break;
|
||||
default:
|
||||
return -ENOENT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue