mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
node: add active flag for rate match
Add flags to the rate match io area Add flag to activate/deactivate rate match Set active flag in rate match when slaved Update rate before starting resample
This commit is contained in:
parent
f5b9862a89
commit
116676e149
3 changed files with 14 additions and 3 deletions
|
|
@ -767,6 +767,14 @@ static int impl_node_process(void *object)
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->io_rate_match) {
|
||||
if (SPA_FLAG_IS_SET(this->io_rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE)) {
|
||||
resample_update_rate(&this->resample, this->io_rate_match->rate);
|
||||
} else {
|
||||
resample_update_rate(&this->resample, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
in_len = (size - inport->offset) / sizeof(float);
|
||||
out_len = (maxsize - outport->offset) / sizeof(float);
|
||||
|
||||
|
|
@ -812,7 +820,6 @@ static int impl_node_process(void *object)
|
|||
}
|
||||
|
||||
if (this->io_rate_match) {
|
||||
resample_update_rate(&this->resample, this->io_rate_match->rate);
|
||||
this->io_rate_match->delay = resample_delay(&this->resample);
|
||||
this->io_rate_match->size = resample_in_len(&this->resample, max);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue