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