mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
audioconvert: set monitor port buffer size correctly
Also use quantum_limit samples on the monitor ports. Fixes #2677
This commit is contained in:
parent
900621ba9e
commit
46c8c9ec03
1 changed files with 3 additions and 3 deletions
|
|
@ -1724,20 +1724,20 @@ impl_node_port_enum_params(void *object, int seq,
|
||||||
case SPA_PARAM_Buffers:
|
case SPA_PARAM_Buffers:
|
||||||
{
|
{
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
struct dir *dir;
|
|
||||||
|
|
||||||
if (!port->have_format)
|
if (!port->have_format)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
if (result.index > 0)
|
if (result.index > 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
dir = &this->dir[direction];
|
if (PORT_IS_DSP(this, direction, port_id)) {
|
||||||
if (dir->mode == SPA_PARAM_PORT_CONFIG_MODE_dsp) {
|
|
||||||
/* DSP ports always use the quantum_limit as the buffer
|
/* DSP ports always use the quantum_limit as the buffer
|
||||||
* size. */
|
* size. */
|
||||||
size = this->quantum_limit;
|
size = this->quantum_limit;
|
||||||
} else {
|
} else {
|
||||||
uint32_t irate, orate;
|
uint32_t irate, orate;
|
||||||
|
struct dir *dir = &this->dir[direction];
|
||||||
|
|
||||||
/* Convert ports are scaled so that they can always
|
/* Convert ports are scaled so that they can always
|
||||||
* provide one quantum of data */
|
* provide one quantum of data */
|
||||||
irate = dir->format.info.raw.rate;
|
irate = dir->format.info.raw.rate;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue