In case of variable src_ratio the caller must provide more (at least 2?) input samples otherwise ratio stays the same. I think the reason is linear interpolation on this line:
|
src_ratio = state->last_ratio + priv->out_gen * (data->src_ratio - state->last_ratio) / priv->out_count ; |
Basically priv->out_gen is 0 and therefore src_ratio = state->last_ratio until the end of times.
In case of variable
src_ratiothe caller must provide more (at least 2?) input samples otherwiseratiostays the same. I think the reason is linear interpolation on this line:libsamplerate/src/src_linear.c
Line 112 in 4858fb0
Basically
priv->out_genis0and thereforesrc_ratio = state->last_ratiountil the end of times.