mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-18 08:56:45 -05:00
alsa: clean up some latency param handling
This commit is contained in:
parent
6d0613bc9a
commit
7554bdea97
2 changed files with 7 additions and 6 deletions
|
|
@ -687,12 +687,13 @@ impl_node_port_set_param(void *object,
|
|||
break;
|
||||
case SPA_PARAM_Latency:
|
||||
{
|
||||
enum spa_direction other = SPA_DIRECTION_REVERSE(direction);
|
||||
struct spa_latency_info info;
|
||||
if (param == NULL)
|
||||
info = SPA_LATENCY_INFO(SPA_DIRECTION_REVERSE(direction));
|
||||
info = SPA_LATENCY_INFO(other);
|
||||
else if ((res = spa_latency_parse(param, &info)) < 0)
|
||||
return res;
|
||||
if (direction == info.direction)
|
||||
if (info.direction != other)
|
||||
return -EINVAL;
|
||||
|
||||
this->latency[info.direction] = info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue