Lines Matching defs:resampler

57 /* Calculate number of input samples for the resampler so that either the number
65 if (!(r = i->thread_info.resampler))
73 /* Get the current internal delay of the resampler */
88 /* Initially set the history to 3 times the resampler delay. Use at least 2 ms.
89 * We try to find a value between 2 and 3 times the resampler delay to ensure
91 * pa_resampler_get_max_history() in resampler.c. */
98 /* If possible, use between 2 and 3 times the resampler delay */
361 pa_resampler *resampler = NULL;
532 if (!pa_sink_input_new_data_is_passthrough(data)) /* no resampler for passthrough content */
533 if (!(resampler = pa_resampler_new(
566 i->actual_resample_method = resampler ? pa_resampler_get_method(resampler) : PA_RESAMPLER_INVALID;
618 i->thread_info.resampler = resampler;
857 if (i->thread_info.resampler)
858 pa_resampler_free(i->thread_info.resampler);
977 block_size_max_sink_input = i->thread_info.resampler ?
978 pa_resampler_max_block_size(i->thread_info.resampler) :
990 if (i->thread_info.resampler) {
991 ilength = pa_resampler_request(i->thread_info.resampler, slength);
1060 } else if (!i->thread_info.resampler && nvfs) {
1063 /* If we don't need a resampler we can merge the
1074 /* Push chunk into history queue to retain some resampler input history. */
1077 if (!i->thread_info.resampler) {
1087 pa_resampler_run(i->thread_info.resampler, &wchunk, &rchunk);
1162 rbq = pa_resampler_request(i->thread_info.resampler, rbq);
1164 rbq = - (int64_t) pa_resampler_request(i->thread_info.resampler, - rbq);
1205 sink_input_nbytes = pa_resampler_request(i->thread_info.resampler, nbytes);
1233 sink_input_amount = pa_resampler_request(i->thread_info.resampler, max_rewrite);
1239 sink_amount = pa_resampler_result(i->thread_info.resampler, sink_input_amount);
1252 pa_memblockq_seek(i->thread_info.render_memblockq, - ((int64_t) pa_resampler_result(i->thread_info.resampler, sink_input_amount)),PA_SEEK_RELATIVE, true);
1254 /* Rewind the resampler */
1255 if (i->thread_info.resampler) {
1262 history_result = pa_resampler_rewind(i->thread_info.resampler, sink_amount, i->thread_info.history_memblockq, history_bytes);
1270 * resampler state, that is if a true matching period exists. In case where
1273 history_result -= (int64_t) pa_resampler_result(i->thread_info.resampler, history_bytes);
1305 return pa_resampler_request(i->thread_info.resampler, i->sink->thread_info.max_rewind);
1316 return pa_resampler_request(i->thread_info.resampler, i->sink->thread_info.max_request);
1331 max_rewind = pa_resampler_request(i->thread_info.resampler, nbytes);
1333 resampler_history = pa_resampler_get_max_history(i->thread_info.resampler);
1350 i->update_max_request(i, pa_resampler_request(i->thread_info.resampler, nbytes));
1739 if (b && i->thread_info.resampler) {
1740 pa_resampler_reset(i->thread_info.resampler);
1749 pa_return_val_if_fail(i->thread_info.resampler, -PA_ERR_BADSTATE);
1760 pa_resampler_set_input_rate(i->thread_info.resampler, rate);
2084 /* Get resampler latency of old resampler */
2087 /* Flush the render memblockq and reset the resampler */
2089 if (i->thread_info.resampler)
2090 pa_resampler_reset(i->thread_info.resampler);
2100 chunk.length = pa_resampler_result(i->thread_info.resampler, bytes_on_origin_sink);
2111 if (i->thread_info.resampler)
2112 block_size = pa_resampler_max_block_size(i->thread_info.resampler);
2131 if (i->thread_info.resampler) {
2132 pa_resampler_run(i->thread_info.resampler, &in_chunk, &out_chunk);
2367 r[0] += pa_resampler_get_delay_usec(i->thread_info.resampler);
2376 pa_resampler_set_input_rate(i->thread_info.resampler, PA_PTR_TO_UINT(userdata));
2483 nbytes = pa_resampler_request(i->thread_info.resampler, nbytes);
2520 nbytes = pa_resampler_result(i->thread_info.resampler, nbytes);
2536 /* FIXME: Shouldn't access resampler object from main context! */
2543 i->thread_info.resampler ? pa_resampler_max_block_size(i->thread_info.resampler) : 0);
2578 /* Updates the sink input's resampler with whatever the current sink requires
2587 if (i->thread_info.resampler &&
2588 pa_sample_spec_equal(pa_resampler_output_sample_spec(i->thread_info.resampler), &i->sink->sample_spec) &&
2589 pa_channel_map_equal(pa_resampler_output_channel_map(i->thread_info.resampler), &i->sink->channel_map))
2591 new_resampler = i->thread_info.resampler;
2620 if (new_resampler == i->thread_info.resampler)
2623 if (i->thread_info.resampler)
2624 pa_resampler_free(i->thread_info.resampler);
2626 i->thread_info.resampler = new_resampler;
2645 pa_log_debug("Updated resampler for sink input %d", i->index);