mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
alsa: only try to pull when out of buffers
This commit is contained in:
parent
922099c67e
commit
cafb22a6b9
1 changed files with 2 additions and 1 deletions
|
|
@ -401,6 +401,8 @@ pull_frames(struct state *state,
|
||||||
spa_log_trace(state->log, "alsa-util %p: reuse buffer %u", state, b->outbuf->id);
|
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->callbacks->reuse_buffer(state->callbacks_data, 0, b->outbuf->id);
|
||||||
state->ready_offset = 0;
|
state->ready_offset = 0;
|
||||||
|
|
||||||
|
try_pull(state, frames, total_frames, do_pull);
|
||||||
}
|
}
|
||||||
total_frames += n_frames;
|
total_frames += n_frames;
|
||||||
to_write -= n_frames;
|
to_write -= n_frames;
|
||||||
|
|
@ -409,7 +411,6 @@ pull_frames(struct state *state,
|
||||||
state, total_frames, to_write);
|
state, total_frames, to_write);
|
||||||
}
|
}
|
||||||
|
|
||||||
try_pull(state, frames, total_frames, do_pull);
|
|
||||||
|
|
||||||
if (total_frames == 0 && do_pull) {
|
if (total_frames == 0 && do_pull) {
|
||||||
total_frames = SPA_MIN(frames, state->threshold);
|
total_frames = SPA_MIN(frames, state->threshold);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue