libsamplerate icon indicating copy to clipboard operation
libsamplerate copied to clipboard

One input frame is not enough for variable ratio

Open RadoBuransky opened this issue 1 year ago • 0 comments

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: https://github.com/libsndfile/libsamplerate/blob/4858fb016550d677de2356486bcceda5aed85a72/src/src_linear.c#L112

Basically priv->out_gen is 0 and therefore src_ratio = state->last_ratio until the end of times.

RadoBuransky avatar Jun 10 '24 19:06 RadoBuransky