On Tuesday, 6 January 2015, 22:18, Christopher Paul Kalafarski wrote: I’m really struggling with what I thought would be relatively simple process of reading a file (with libsndfile), resampling it (using soxr), and writing it back to disk (with sndfile again). I realize this list is for neither of those libraries, but afaik soxr is extracted from SoX just with a different API, and I think my issue is in dealing with the resulting data, and not the API. My main confusion is that if I pass in, e.g., 4096 frames at 48000, and resample to 44100, mathematically I would expect to get back 3763.2 frames. What is the proper way to handle the 0.2 frames in this case? Conceptually, the 0.2 is buffered within the resampler, so consecutive inputs of 4096 could result in 3763, 3763, 3763, 3763, 3764, 3763, ... being output. In practice though, there can be a lot more variation in the output pattern, due to internal buffering and block processing.  For this reason, it often makes sense for resampling to be output driven. E.g., if every 10ms, you need to present 441 samples to your output hardware, then every 10ms, resample as much input data as is needed to get (at least) 441 samples needed for the output. soxr supports this paradigm via the soxr_set_input_fn() and soxr_output() functions.  HTH.