sink, source: Consolidate passthrough setup in reconfigure

This moves over the saving+resetting/restoring of volumes and source
suspending/unsuspending while entering/leaving passthrough mode into
reconfigure functions. This makes it easier to reason about exactly what
behaviour occurs at the time, as well as avoids loss of precision during
the remapping of the internal volume values in this case.
This commit is contained in:
Arun Raghavan 2018-09-19 18:24:50 +05:30 committed by Arun Raghavan
parent 0d85b18460
commit cbaf278f1e
6 changed files with 50 additions and 96 deletions

View file

@ -407,9 +407,6 @@ bool pa_source_is_filter(pa_source *s);
/* Is the source in passthrough mode? (that is, is this a monitor source for a sink
* that has a passthrough sink input connected to it. */
bool pa_source_is_passthrough(pa_source *s);
/* These should be called when a source enters/leaves passthrough mode */
void pa_source_enter_passthrough(pa_source *s);
void pa_source_leave_passthrough(pa_source *s);
void pa_source_set_volume(pa_source *source, const pa_cvolume *volume, bool sendmsg, bool save);
const pa_cvolume *pa_source_get_volume(pa_source *source, bool force_refresh);