[pulseaudio-discuss] [PATCH 6/6] resampler: Make some basic functions for rewinding
Alexander E. Patrakov
patrakov at gmail.com
Sun Feb 1 07:29:04 PST 2015
29.01.2015 03:14, David Henningsson wrote:
> The resampler framework just forwards the request to the lfe filter.
> There are no resampler impl that can rewind yet, so just reset the
> resampler impl instead of properly rewinding yet.
>
> Note: Rewinds on the resampler happens very rarely - since this is
> done on the sink-input side rather than the sink side, and PA keeps
> a copy of already processed material, then this can only happen if
> the client actively rewinds. And I don't know of any application that
> actually uses that feature...
>
> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
> ---
> +void pa_resampler_rewind(pa_resampler *r, size_t amount) {
This needs more documentation, and maybe even a different signature. At
least, what amount are we talking about? Input or output samples? How do
I convert to the other units?
Basically, a proper signature is what would allow this code in
pa_sink_input_process_rewind to be removed:
/* Transform into local domain */
if (i->thread_info.resampler)
max_rewrite =
pa_resampler_request(i->thread_info.resampler, max_rewrite);
...because the call to pa_resampler_request() is only valid for
appending, not for rewinding samples.
--
Alexander E. Patrakov
More information about the pulseaudio-discuss
mailing list