mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: we can always signal that there is a buffer
This commit is contained in:
parent
a3b614fff6
commit
4aaa2cbc6b
2 changed files with 8 additions and 7 deletions
|
|
@ -317,8 +317,6 @@ static inline void try_pull(struct state *state, snd_pcm_uframes_t frames, bool
|
|||
|
||||
if (spa_list_is_empty(&state->ready) && do_pull) {
|
||||
spa_log_trace(state->log, "alsa-util %p: %d", state, io->status);
|
||||
if (io->status != SPA_RESULT_OK)
|
||||
return;
|
||||
io->status = SPA_RESULT_NEED_BUFFER;
|
||||
io->range.offset = state->sample_count * state->frame_size;
|
||||
io->range.min_size = state->threshold * state->frame_size;
|
||||
|
|
|
|||
|
|
@ -82,9 +82,10 @@ static int schedule_tee_reuse_buffer(struct spa_node *data, uint32_t port_id, ui
|
|||
struct pw_port *this = &impl->this;
|
||||
struct spa_graph_port *p = &this->rt.mix_port, *pp;
|
||||
|
||||
if ((pp = p->peer) != NULL)
|
||||
if ((pp = p->peer) != NULL) {
|
||||
pw_log_trace("tee reuse buffer %d %d", port_id, buffer_id);
|
||||
spa_node_port_reuse_buffer(pp->node->implementation, port_id, buffer_id);
|
||||
|
||||
}
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
|
|
@ -135,10 +136,12 @@ static int schedule_mix_reuse_buffer(struct spa_node *data, uint32_t port_id, ui
|
|||
struct spa_graph_node *node = &this->rt.mix_node;
|
||||
struct spa_graph_port *p, *pp;
|
||||
|
||||
spa_list_for_each(p, &node->ports[SPA_DIRECTION_INPUT], link)
|
||||
if ((pp = p->peer) != NULL)
|
||||
spa_list_for_each(p, &node->ports[SPA_DIRECTION_INPUT], link) {
|
||||
if ((pp = p->peer) != NULL) {
|
||||
pw_log_trace("mix reuse buffer %d %d", port_id, buffer_id);
|
||||
spa_node_port_reuse_buffer(pp->node->implementation, port_id, buffer_id);
|
||||
|
||||
}
|
||||
}
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue