mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
use spa_pod for control values
Pass a spa_pod as the control io area. The pod is not supposed to change in structure, only the values do so we can achieve the same kind of performance as passing a single value but still allow for more complex io area layouts to be passed later.
This commit is contained in:
parent
2f66e17180
commit
4b84e34744
2 changed files with 20 additions and 9 deletions
|
|
@ -890,12 +890,22 @@ impl_node_port_set_io(struct spa_node *node,
|
|||
this->io = data;
|
||||
else if (id == t->io.ControlRange)
|
||||
this->io_range = data;
|
||||
else if (id == t->io_prop_wave)
|
||||
this->io_wave = data;
|
||||
else if (id == t->io_prop_wave) {
|
||||
if (SPA_POD_TYPE(data) == SPA_POD_TYPE_ID)
|
||||
this->io_wave = &SPA_POD_VALUE(struct spa_pod_id, data);
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
else if (id == t->io_prop_freq)
|
||||
this->io_freq = data;
|
||||
if (SPA_POD_TYPE(data) == SPA_POD_TYPE_DOUBLE)
|
||||
this->io_freq = &SPA_POD_VALUE(struct spa_pod_double, data);
|
||||
else
|
||||
return -EINVAL;
|
||||
else if (id == t->io_prop_volume)
|
||||
this->io_volume = data;
|
||||
if (SPA_POD_TYPE(data) == SPA_POD_TYPE_DOUBLE)
|
||||
this->io_volume = &SPA_POD_VALUE(struct spa_pod_double, data);
|
||||
else
|
||||
return -EINVAL;
|
||||
else
|
||||
return -ENOENT;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue