alsa: implement set_io and handle position io

Use position io for deciding the size of the output buffers in
alsasrc
This commit is contained in:
Wim Taymans 2018-10-24 10:27:57 +02:00
parent 4aab226047
commit 2206deb3e8
4 changed files with 39 additions and 12 deletions

View file

@ -767,6 +767,10 @@ static void alsa_on_capture_timeout_event(struct spa_source *source)
return;
}
if (state->position) {
state->threshold = state->position->size;
}
avail = snd_pcm_status_get_avail(status);
snd_pcm_status_get_htstamp(status, &state->now);
clock_gettime(CLOCK_MONOTONIC, &now);