node: update quantum and rate at beginning of cycle

Don't directly update the quantum and rate in the driver position
when recalculating the graph or else clients might see different values
during one cycle.

Instead update another variable and copy this into the position when
we start a new cycle.
This commit is contained in:
Wim Taymans 2021-12-07 18:28:57 +01:00
parent c14e89a578
commit 2e199eba43
3 changed files with 16 additions and 8 deletions

View file

@ -728,6 +728,8 @@ struct pw_impl_node {
struct ratelimit rate_limit;
} rt;
struct spa_fraction current_rate;
uint64_t current_quantum;
void *user_data; /**< extra user data */
};