<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">I have been working on a project importing Speex to a embedded platform for a while.<div>When I tried to shut down the macro TWO_PATH in Speex AEC to save space,</div>

<div>an error occurred. Dbf is undefined.</div><div><br></div><div>The 1.2rc1 code is like this</div><div><br></div><div><div>   Dbf = 0;</div><div>   See = 0;    </div><div>#ifdef TWO_PATH</div><div>   /* Difference in response, this is used to estimate the variance of our residual power estimate */</div>

<div>   for (chan = 0; chan &lt; C; chan++)</div><div>   {</div><div>      spectral_mul_accum(st-&gt;X, st-&gt;W+chan*N*K*M, st-&gt;Y+chan*N, N, M*K);</div><div>      spx_ifft(st-&gt;fft_table, st-&gt;Y+chan*N, st-&gt;y+chan*N);</div>

<div>      for (i=0;i&lt;st-&gt;frame_size;i++)</div><div>         st-&gt;e[chan*N+i] = st-&gt;e[chan*N+i+st-&gt;frame_size] - st-&gt;y[chan*N+i+st-&gt;frame_size];</div><div>      Dbf += 10+mdf_inner_prod(st-&gt;e+chan*N, st-&gt;e+chan*N, st-&gt;frame_size);</div>

<div>      for (i=0;i&lt;st-&gt;frame_size;i++)</div><div>         st-&gt;e[chan*N+i] = st-&gt;input[chan*st-&gt;frame_size+i] - st-&gt;y[chan*N+i+st-&gt;frame_size];</div><div>      See += mdf_inner_prod(st-&gt;e+chan*N, st-&gt;e+chan*N, st-&gt;frame_size);</div>

<div>   }</div><div>#endif</div><div><br></div><div>#ifndef TWO_PATH</div><div>   Sff = See;</div><div>#endif</div></div><div><br></div><div><br></div><div>but after examining the code, and comparing it with former version of Speex AEC, I think</div>

<div>it should be like this, to enable both with or without TWO_PATH versions to work.</div><div>Is that so?</div><div><br></div><div><br></div><div><div><div>   for (chan = 0; chan &lt; C; chan++)          </div><div>   {</div>

<div><span style="white-space:pre-wrap">        </span>   spectral_mul_accum(st-&gt;X, st-&gt;W+chan*N*K*M, st-&gt;Y+chan*N, N, M*K);</div><div><span style="white-space:pre-wrap">        </span>   spx_ifft(st-&gt;fft_table, st-&gt;Y+chan*N, st-&gt;y+chan*N);</div>

<div>   }</div><div><br></div><div>   See = 0;    </div><div>#ifdef TWO_PATH</div><div>   Dbf = 0;            </div><div><br></div><div>   /* Difference in response, this is used to estimate the variance of our residual power estimate */</div>

<div>   for (chan = 0; chan &lt; C; chan++)</div><div>   {</div><div>      for (i=0;i&lt;st-&gt;frame_size;i++)</div><div>         st-&gt;e[chan*N+i] = SUB16(st-&gt;e[chan*N+i+st-&gt;frame_size], st-&gt;y[chan*N+i+st-&gt;frame_size]);</div>

<div>      Dbf += 10+mdf_inner_prod(st-&gt;e+chan*N, st-&gt;e+chan*N, st-&gt;frame_size);</div><div>   }</div><div>#endif</div><div><br></div><div>   for (chan = 0; chan &lt; C; chan++)</div><div>   {</div><div><span style="white-space:pre-wrap">        </span>   for (i=0;i&lt;st-&gt;frame_size;i++)</div>

<div><span style="white-space:pre-wrap">                </span>   st-&gt;e[chan*N+i] = SUB16(st-&gt;input[chan*st-&gt;frame_size+i], st-&gt;y[chan*N+i+st-&gt;frame_size]);</div><div><span style="white-space:pre-wrap">        </span>   See += mdf_inner_prod(st-&gt;e+chan*N, st-&gt;e+chan*N, st-&gt;frame_size);</div>

<div>   }</div><div><br></div><div>#ifndef TWO_PATH</div><div>   Sff = See;</div><div>#endif</div></div></div></span>