title: Proper way to use WebRtcAecm functions
body: <p>I am trying to understand how to properly use two WebRtcAecm functions. It seems there are the two main functions that are used for echo cancellation on mobile.</p>
  
  <p>The first one is <code>WebRtcAecm_BufferFarend</code>:</p>
  
  <pre><code>int32_t WebRtcAecm_BufferFarend(void* aecmInst,
                              const int16_t* farend,
                              int16_t nrOfSamples);
  </code></pre>
  
  <p>I guess this is where we pass in the audio data that we receive from the remote end. Do we keep calling this method as we continue to receive audio packets? Also, does the function make a copy of the passed-in buffer so that we could reuse the same buffer for the next packet?</p>
  
  <p>The other function is <code>WebRtcAecm_Process</code>:</p>
  
  <pre><code>int32_t WebRtcAecm_Process(void* aecmInst,
                         const int16_t* nearendNoisy,
                         const int16_t* nearendClean,
                         int16_t* out,
                         int16_t nrOfSamples,
                         int16_t msInSndCardBuf);
  </code></pre>
  
  <p>In a code snippet on the Internet, I saw that the same pointer was being used for nearendNoisy and nearendClean. Shouldn't nearendClean parameter be null if we don't do any noise suppression?</p>
  
  <p>Finally, is there any issue in calling these two methods in two different threads? Our remote audio receiver code is in one thread and our microphone listener code is in another thread.</p>
  
  <p>Thank you in advance for your help.</p>