echo-cancel: Convert AGC API to deal with pa_volume_t

It is expected that the underlying AGC mechanism will likely provide a
single volume for the source rather than a per-channel volume. Dealing
with per-channel volumes just adds complexity with regards to the
actual volume setting (depending on whether volume sharing is enabled or
not, we would set the volume on the source output of the virtual source,
and their sample specs may be different).

Using a single volume allows us to sidestep this problem entirely.
This commit is contained in:
Arun Raghavan 2016-02-25 17:58:38 +05:30
parent 05a6af744b
commit fa2b0b4aad
3 changed files with 22 additions and 24 deletions

View file

@ -132,8 +132,8 @@ struct pa_echo_canceller {
};
/* Functions to be used by the canceller analog gain control routines */
void pa_echo_canceller_get_capture_volume(pa_echo_canceller *ec, pa_cvolume *v);
void pa_echo_canceller_set_capture_volume(pa_echo_canceller *ec, pa_cvolume *v);
pa_volume_t pa_echo_canceller_get_capture_volume(pa_echo_canceller *ec);
void pa_echo_canceller_set_capture_volume(pa_echo_canceller *ec, pa_volume_t volume);
/* Computes EC block size in frames (rounded down to nearest power-of-2) based
* on sample rate and milliseconds. */