mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
resample: improve output buffer size
If we don't have an output size configued, produce output as soon as we can.
This commit is contained in:
parent
9773e2245f
commit
1a786e04f9
1 changed files with 3 additions and 0 deletions
|
|
@ -806,6 +806,7 @@ static int impl_node_process(struct spa_node *node)
|
|||
this, in_len, size / sizeof(float), inport->offset,
|
||||
out_len, maxsize / sizeof(float), outport->offset);
|
||||
|
||||
db->datas[i].chunk->offset = 0;
|
||||
db->datas[i].chunk->size = outport->offset + (out_len * sizeof(float));
|
||||
}
|
||||
|
||||
|
|
@ -814,6 +815,8 @@ static int impl_node_process(struct spa_node *node)
|
|||
inio->status = SPA_STATUS_NEED_BUFFER;
|
||||
inport->offset = 0;
|
||||
SPA_FLAG_SET(res, SPA_STATUS_NEED_BUFFER);
|
||||
if (outport->ctrl == NULL)
|
||||
maxsize = 0;
|
||||
}
|
||||
outport->offset += out_len * sizeof(float);
|
||||
if (outport->offset >= maxsize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue