Lines Matching refs:new_rate
277 uint32_t new_rate; in rtpoll_work_cb() local
339 …new_rate = (uint32_t) ((double) (RATE_UPDATE_INTERVAL + latency/4 - s->intended_latency/4) / (doub… in rtpoll_work_cb()
342 if (new_rate < (uint32_t) (s->base_rate*0.8) || new_rate > (uint32_t) (s->base_rate*1.25)) { in rtpoll_work_cb()
343 … pa_log_warn("Sample rates too different, not adjusting (%u vs. %u).", s->base_rate, new_rate); in rtpoll_work_cb()
344 new_rate = s->base_rate; in rtpoll_work_cb()
346 if (s->base_rate < new_rate + 20 && new_rate < s->base_rate + 20) in rtpoll_work_cb()
347 new_rate = s->base_rate; in rtpoll_work_cb()
349 … if (new_rate < (uint32_t) (current_rate*0.998) || new_rate > (uint32_t) (current_rate*1.002)) { in rtpoll_work_cb()
350 …fo("New rate of %u Hz not within 2‰ of %u Hz, forcing smaller adjustment", new_rate, current_rate); in rtpoll_work_cb()
351 … new_rate = PA_CLAMP(new_rate, (uint32_t) (current_rate*0.998), (uint32_t) (current_rate*1.002)); in rtpoll_work_cb()
354 s->sink_input->sample_spec.rate = new_rate; in rtpoll_work_cb()