Lines Matching refs:rate
275 s->default_sample_rate = s->sample_spec.rate;
1505 pa_sample_format_to_string(s->sample_spec.format), s->sample_spec.rate);
1522 /* We have to try to use the sink input format and rate */
1524 desired_spec.rate = spec->rate;
1527 /* We just try to set the sink input's sample rate if it's not too low */
1528 if (spec->rate >= default_rate || spec->rate >= alternate_rate)
1529 desired_spec.rate = spec->rate;
1532 } else if (default_rate == spec->rate || alternate_rate == spec->rate) {
1533 /* We can directly try to use this rate */
1534 desired_spec.rate = spec->rate;
1538 if (desired_spec.rate != spec->rate) {
1539 /* See if we can pick a rate that results in less resampling effort */
1540 if (default_rate % 11025 == 0 && spec->rate % 11025 == 0)
1542 if (default_rate % 4000 == 0 && spec->rate % 4000 == 0)
1544 if (alternate_rate % 11025 == 0 && spec->rate % 11025 == 0)
1546 if (alternate_rate % 4000 == 0 && spec->rate % 4000 == 0)
1550 desired_spec.rate = alternate_rate;
1552 desired_spec.rate = default_rate;
1561 pa_log_debug("Suspending sink %s due to changing format, desired format = %s rate = %u",
1562 s->name, pa_sample_format_to_string(desired_spec.format), desired_spec.rate);
4005 void pa_sink_set_sample_rate(pa_sink *s, uint32_t rate) {
4009 pa_assert(pa_sample_rate_valid(rate));
4011 old_rate = s->sample_spec.rate;
4012 if (old_rate == rate)
4015 pa_log_info("%s: rate: %u -> %u", s->name, old_rate, rate);
4017 s->sample_spec.rate = rate;