spa: add some latency helpers

Add more fields to the latency object.
Add methods to create, parse and process latency info.
This commit is contained in:
Wim Taymans 2021-05-24 18:01:19 +02:00
parent 0779862cda
commit b9b89b92b2
15 changed files with 245 additions and 145 deletions

View file

@ -630,7 +630,7 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
state->headroom = SPA_MIN(state->headroom, state->buffer_frames);
state->start_delay = state->default_start_delay;
state->latency = state->headroom;
state->latency.min_rate = state->latency.max_rate = state->headroom;
state->period_frames = period_size;
periods = state->buffer_frames / state->period_frames;