resampler: Change interface, resampler may return the number of leftover frames
authorPeter Meerwald <pmeerw@pmeerw.net>
Sun, 21 Jul 2013 21:14:40 +0000 (23:14 +0200)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 8 Nov 2013 08:27:30 +0000 (10:27 +0200)
commit79b237ca02cbcce41e1c3de5f11143f0f3ced678
tree9610fdee7dae75fa5f2c5de2d4fc6eb4edafbd1b
parent6d61c7779d1f5dc139cd6f354d9b75ce4b20e37c
resampler: Change interface, resampler may return the number of leftover frames

some resampler implementations (e.g. libsamplerate and ffmpeg) do not consume
the entire input buffer; the impl_resample() function now has a return value
returning the number of frames in the input buffer not processed

these frames must be saved in appropriate buffer and presented together with
new input data

also change the parameter names from in_samples, out_samples to in_n_frames,
out_n_frames, respectively (n_frames = samples / channels)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
src/pulsecore/resampler.c
src/pulsecore/resampler.h