pulse: do all delay calculations when we need it

Just store the values for calculating the delay in the hot path. Then
compute the delay only when we need it.
This commit is contained in:
Wim Taymans 2026-05-26 14:50:47 +02:00
parent 3a9dbc6d99
commit 784a9dd00f
2 changed files with 24 additions and 11 deletions

View file

@ -64,7 +64,11 @@ struct stream {
uint64_t ticks_base;
uint64_t timestamp;
uint64_t idle_time;
int64_t delay;
struct {
uint64_t buffered;
int64_t delay;
struct spa_fraction rate;
} delay;
uint32_t last_quantum;
int64_t requested;