From cafb22a6b941ce970893b339bd43f1f38efded0f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 16 Feb 2018 16:56:19 +0100 Subject: [PATCH] alsa: only try to pull when out of buffers --- spa/plugins/alsa/alsa-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-utils.c b/spa/plugins/alsa/alsa-utils.c index 129a18f4e..50e812fc2 100644 --- a/spa/plugins/alsa/alsa-utils.c +++ b/spa/plugins/alsa/alsa-utils.c @@ -401,6 +401,8 @@ pull_frames(struct state *state, spa_log_trace(state->log, "alsa-util %p: reuse buffer %u", state, b->outbuf->id); state->callbacks->reuse_buffer(state->callbacks_data, 0, b->outbuf->id); state->ready_offset = 0; + + try_pull(state, frames, total_frames, do_pull); } total_frames += n_frames; to_write -= n_frames; @@ -409,7 +411,6 @@ pull_frames(struct state *state, state, total_frames, to_write); } - try_pull(state, frames, total_frames, do_pull); if (total_frames == 0 && do_pull) { total_frames = SPA_MIN(frames, state->threshold);