alsa: only pull once

This commit is contained in:
Wim Taymans 2018-03-14 12:17:45 +01:00
parent 6eea9247ea
commit 52efeb5181
2 changed files with 2 additions and 1 deletions

View file

@ -597,7 +597,6 @@ static int impl_node_process_input(struct spa_node *node)
spa_list_append(&this->ready, &b->link);
SPA_FLAG_UNSET(b->flags, BUFFER_FLAG_OUT);
input->buffer_id = SPA_ID_INVALID;
input->status = SPA_STATUS_OK;
}

View file

@ -343,6 +343,8 @@ static inline void try_pull(struct state *state, snd_pcm_uframes_t frames,
if (spa_list_is_empty(&state->ready) && do_pull) {
spa_log_trace(state->log, "alsa-util %p: %d %lu", state, io->status,
state->filled + written);
if (io->status == SPA_STATUS_NEED_BUFFER)
return;
io->status = SPA_STATUS_NEED_BUFFER;
if (state->range) {
state->range->offset = state->sample_count * state->frame_size;