mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
sink-input,source-output: Avoid unneccessary rate updates
This makes sure we only call sink/source update_rate() if the stream being woken up has a sample spec that doesn't match the corresponding device'. https://bugs.freedesktop.org/show_bug.cgi?id=49875
This commit is contained in:
parent
d85360e65c
commit
8f540c6e76
2 changed files with 4 additions and 2 deletions
|
|
@ -510,7 +510,8 @@ static void source_output_set_state(pa_source_output *o, pa_source_output_state_
|
|||
if (o->state == state)
|
||||
return;
|
||||
|
||||
if (o->state == PA_SOURCE_OUTPUT_CORKED && state == PA_SOURCE_OUTPUT_RUNNING && pa_source_used_by(o->source) == 0) {
|
||||
if (o->state == PA_SOURCE_OUTPUT_CORKED && state == PA_SOURCE_OUTPUT_RUNNING && pa_source_used_by(o->source) == 0 &&
|
||||
!pa_sample_spec_equal(&o->sample_spec, &o->source->sample_spec)) {
|
||||
/* We were uncorked and the source was not playing anything -- let's try
|
||||
* to update the sample rate to avoid resampling */
|
||||
pa_source_update_rate(o->source, o->sample_spec.rate, pa_source_output_is_passthrough(o));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue