resample: take already queued sample into account

When asking for samples, take into account the amount of samples
we already have converted.
This commit is contained in:
Wim Taymans 2021-01-18 15:07:57 +01:00
parent 51d44e9154
commit 88727afbd2

View file

@ -882,7 +882,7 @@ static int impl_node_process(void *object)
else
resample_update_rate(&this->resample, 1.0);
this->io_rate_match->delay = resample_delay(&this->resample);
this->io_rate_match->size = resample_in_len(&this->resample, max);
this->io_rate_match->size = resample_in_len(&this->resample, max - outport->offset / sizeof(float));
}
return res;
}