audioconvert2: fix for quantum changes

Use the offset as the buffer size.
Use the amount of requested - amount of used samples as queued samples.
This commit is contained in:
Wim Taymans 2022-06-15 15:39:04 +02:00
parent 708b57aa64
commit 0ec41e60ef

View file

@ -2452,8 +2452,8 @@ static int impl_node_process(void *object)
for (j = 0; j < port->blocks; j++) {
bd = &buf->buf->datas[j];
bd->chunk->size = n_samples * port->stride;
spa_log_trace_fp(this->log, "out: %d %d %d", n_samples,
bd->chunk->size = this->out_offset * port->stride;
spa_log_trace_fp(this->log, "out: %d %d %d", this->out_offset,
port->stride, bd->chunk->size);
}
io->status = SPA_STATUS_HAVE_DATA;
@ -2478,7 +2478,7 @@ static int impl_node_process(void *object)
}
}
resample_update_rate_match(this, resample_passthrough,
n_out - this->out_offset,
max_out - this->out_offset,
max_in - this->in_offset);
return res;