EXPORT void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play)
{
/*speex_warning_int("playback with fill level ", st->play_buf_pos/st->frame_size);*/
if (!st->play_buf_started)
{
speex_warning("discarded first playback frame");
return;
}
if (st->play_buf_pos<=PLAYBACK_DELAY*st->frame_size)
{
int i;
for (i=0;i<st->frame_size;i++)
st->play_buf[st->play_buf_pos+i] = play[i];
st->play_buf_pos += st->frame_size;
if (st->play_buf_pos <= (PLAYBACK_DELAY-1)*st->frame_size)
{
speex_warning("Auto-filling the buffer (your application is buggy and/or got xruns)");
for (i=0;i<st->frame_size;i++)
st->play_buf[st->play_buf_pos+i] = play[i];
st->play_buf_pos += st->frame_size;
}
} else {
speex_warning("Had to discard a playback frame (your application is buggy and/or got xruns)");
}
}
что мне закомментировать, чтобы услышать эхо?