source: Bring rate update code in sync with sink code

Basically adds code to handle passthrough sources. This isn't a tested
path at the moment, but in the future, when we do wish to support these,
it'll save us the trouble of having to sync all the code again.
This commit is contained in:
Arun Raghavan 2011-10-11 00:47:56 +05:30
parent b232fbd8f8
commit b9ff90fef8
4 changed files with 32 additions and 21 deletions

View file

@ -1380,8 +1380,8 @@ pa_bool_t pa_sink_update_rate(pa_sink *s, uint32_t rate, pa_bool_t passthrough)
if (s->update_rate(s, desired_rate) == TRUE) {
/* update monitor source as well */
if (s->monitor_source)
pa_source_update_rate(s->monitor_source, desired_rate);
if (s->monitor_source && !passthrough)
pa_source_update_rate(s->monitor_source, desired_rate, FALSE);
pa_log_info("Changed sampling rate successfully");
return TRUE;
}