mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
sink, source: Prevent unnecessary rate update attempts
We don't need to try a rate update if the desired sample rate is the same as the one the sink or source is already using.
This commit is contained in:
parent
0a0189d972
commit
cd1102cce0
4 changed files with 10 additions and 18 deletions
|
|
@ -371,10 +371,7 @@ int pa_sink_input_new(
|
|||
|
||||
pa_log_info("Trying to change sample rate");
|
||||
if (pa_sink_update_rate(data->sink, data->sample_spec.rate, pa_sink_input_new_data_is_passthrough(data)) == TRUE)
|
||||
pa_log_info("Rate changed to %u Hz",
|
||||
data->sink->sample_spec.rate);
|
||||
else
|
||||
pa_log_info("Resampling enabled to %u Hz", data->sink->sample_spec.rate);
|
||||
pa_log_info("Rate changed to %u Hz", data->sink->sample_spec.rate);
|
||||
}
|
||||
|
||||
/* Due to the fixing of the sample spec the volume might not match anymore */
|
||||
|
|
@ -1662,11 +1659,7 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, pa_bool_t save) {
|
|||
|
||||
pa_log_info("Trying to change sample rate");
|
||||
if (pa_sink_update_rate(dest, i->sample_spec.rate, pa_sink_input_is_passthrough(i)) == TRUE)
|
||||
pa_log_info("Rate changed to %u Hz",
|
||||
dest->sample_spec.rate);
|
||||
else
|
||||
pa_log_info("Resampling enabled to %u Hz",
|
||||
dest->sample_spec.rate);
|
||||
pa_log_info("Rate changed to %u Hz", dest->sample_spec.rate);
|
||||
}
|
||||
|
||||
if (i->moving)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue