mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audioadapter: loop until we have data
Keep caling the slave processing function until we have data from the converter or until no process can be made.
This commit is contained in:
parent
58a7e18ed5
commit
d67d012362
2 changed files with 11 additions and 4 deletions
|
|
@ -875,12 +875,19 @@ static int impl_node_process(void *object)
|
||||||
status = spa_node_process(this->convert);
|
status = spa_node_process(this->convert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
again:
|
||||||
status = spa_node_process(this->slave);
|
status = spa_node_process(this->slave);
|
||||||
|
|
||||||
if (this->direction == SPA_DIRECTION_OUTPUT && !this->master) {
|
if (this->direction == SPA_DIRECTION_OUTPUT &&
|
||||||
if (this->use_converter)
|
!this->master && this->use_converter) {
|
||||||
status = spa_node_process(this->convert);
|
status = spa_node_process(this->convert);
|
||||||
|
|
||||||
|
if (!(status & SPA_STATUS_HAVE_DATA) &&
|
||||||
|
(status & SPA_STATUS_NEED_DATA))
|
||||||
|
goto again;
|
||||||
}
|
}
|
||||||
|
spa_log_trace_fp(this->log, "%p: process status:%d", this, status);
|
||||||
|
|
||||||
this->master = false;
|
this->master = false;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
|
||||||
|
|
@ -639,7 +639,7 @@ static int impl_port_use_buffers(void *object,
|
||||||
} else
|
} else
|
||||||
size = buf_size;
|
size = buf_size;
|
||||||
}
|
}
|
||||||
pw_log_debug(NAME" %p: got buffer %d %d datas, mapped size %d", stream, i,
|
pw_log_debug(NAME" %p: got buffer id:%d datas:%d, mapped size %d", stream, i,
|
||||||
buffers[i]->n_datas, size);
|
buffers[i]->n_datas, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue