[PATCH 06/11] echo-cancel: Relax restrictions on webrtc AEC stream config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2015-11-04 at 17:44 +0530, arun at accosted.net wrote:
> From: Arun Raghavan <git at arunraghavan.net>
> 
> ---
>  src/modules/echo-cancel/webrtc.cc | 37
> +++++++++++++++++++++++++++++--------
>  1 file changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/src/modules/echo-cancel/webrtc.cc b/src/modules/echo-
> cancel/webrtc.cc
> index e2ce08e..3be7fe5 100644
> --- a/src/modules/echo-cancel/webrtc.cc
> +++ b/src/modules/echo-cancel/webrtc.cc
> @@ -78,6 +78,33 @@ static int routing_mode_from_string(const char
> *rmode) {
>          return -1;
>  }
>  
> +void pa_webrtc_ec_fixate_spec(pa_sample_spec *rec_ss, pa_channel_map
> *rec_map,
> +                              pa_sample_spec *play_ss,
> pa_channel_map *play_map,
> +                              pa_sample_spec *out_ss, pa_channel_map
> *out_map)
> +{
> +    rec_ss->format = PA_SAMPLE_S16NE;
> +    play_ss->format = PA_SAMPLE_S16NE;
> +
> +    /* AudioProcessing expects one of the following rates */
> +    if (rec_ss->rate > 48000)
> +        rec_ss->rate = 48000;
> +    else if (rec_ss->rate > 32000 && rec_ss->rate < 48000)
> +        rec_ss->rate = 32000;
> +    else if (rec_ss->rate > 16000 && rec_ss->rate < 32000)
> +        rec_ss->rate = 16000;
> +    else if (rec_ss->rate != 8000)
> +        rec_ss->rate = 8000;
> +    else
> +        ; /* All good, rate is 8/16/32/48 kHz */

This condition is invalid (will pick 8000 for all valid rates). Fixing
in my tree.

-- Arun


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux