libsndfile / libsamplerate

An audio Sample Rate Conversion library
http://libsndfile.github.io/libsamplerate/
BSD 2-Clause "Simplified" License
600 stars 167 forks source link

Input samples needed to get n output samples? #184

Closed moon-chilled closed 1 year ago

moon-chilled commented 1 year ago

Hi,

A feature that would be useful for random-access-type applications is a way to answer the question: how many samples do I need to put in to get out n samples? (Or, alternately: if I put in n samples, how many will I get out?) Obviously, it is possible to estimate this from the sample rate ratio, but I think src has some internal buffering, so I would need to account for that with some slop—how much? Overestimating will needlessly add latency.

moon-chilled commented 1 year ago

sorry this is issue #175