desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
}
- if (passthrough || pa_sink_linked_by(s) == 0) {
- pa_sink_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
- }
+ if (!passthrough && pa_sink_linked_by(s) > 0)
+ return FALSE;
+
+ pa_sink_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
if (s->update_rate(s, desired_rate) == TRUE) {
/* update monitor source as well */
desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
}
- if (passthrough || pa_source_linked_by(s) == 0) {
- pa_source_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
- }
+ if (!passthrough && pa_source_linked_by(s) > 0)
+ return FALSE;
+
+ pa_source_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
if (s->update_rate(s, desired_rate) == TRUE) {
pa_log_info("Changed sampling rate successfully ");