mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
sink, source: Return early from pa_*_update_rate(), if there's no need to do anything
This commit is contained in:
parent
963da3de93
commit
1cd6a3ad70
2 changed files with 6 additions and 0 deletions
|
|
@ -1386,6 +1386,9 @@ bool pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) {
|
|||
pa_sink_input *i;
|
||||
bool use_alternate = false;
|
||||
|
||||
if (rate == s->sample_spec.rate)
|
||||
return true;
|
||||
|
||||
if (!s->update_rate)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -976,6 +976,9 @@ bool pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
|
|||
pa_source_output *o;
|
||||
bool use_alternate = false;
|
||||
|
||||
if (rate == s->sample_spec.rate)
|
||||
return true;
|
||||
|
||||
if (!s->update_rate)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue