Search
Most active topics
Top posting users this month
No user |
GeoMap
Use the asynchronous AEC API of Speex with cautions! e.g. speex_echo_palyback() and speex_echo_capture()
Page 1 of 1
Use the asynchronous AEC API of Speex with cautions! e.g. speex_echo_palyback() and speex_echo_capture()
The echo_diagnostic.m has bugs to run under both Octave and Matlab. I tried to info the developer community by the mailing list , but there seems no one is responsible for it.
The asynchronous AEC API speex_echo_palyback() and speex_echo_capture() is influence by a magic number
A side effect of this magic number is that it delays the play buf queue for 2 frames which may cause AEC mechanism not working at all. A simple work around, is call the speex_echo_capture() twice with empty buffers.
However, this solution is not apparent to most of developers who had not go through the source codes of Speex.
And also the buffer filling scheme is strange, it append zeros at the end of input buffer rather than the head of it.
The asynchronous AEC API speex_echo_palyback() and speex_echo_capture() is influence by a magic number
- Code:
#define PLAYBACK_DELAY 2
A side effect of this magic number is that it delays the play buf queue for 2 frames which may cause AEC mechanism not working at all. A simple work around, is call the speex_echo_capture() twice with empty buffers.
However, this solution is not apparent to most of developers who had not go through the source codes of Speex.
And also the buffer filling scheme is strange, it append zeros at the end of input buffer rather than the head of it.
- Code:
[b]668 if (st->play_buf_pos<=PLAYBACK_DELAY*st->frame_size)
[/b] 669 {
670 int i;
671 for (i=0;i<st->frame_size;i++)
672 st->play_buf[st->play_buf_pos+i] = play[i];
673 st->play_buf_pos += st->frame_size;
674 if (st->play_buf_pos <= (PLAYBACK_DELAY-1)*st->frame_size)
675 {
676 speex_warning("Auto-filling the buffer (your application is buggy and/or got xruns)");
677 for (i=0;i<st->frame_size;i++)
678 st->play_buf[st->play_buf_pos+i] = play[i];
679 st->play_buf_pos += st->frame_size;
680 }
681 } else {
[b] 682 speex_warning("Had to discard a playback frame (your application is buggy and/or got xruns)");
[/b]
683 }
halala- 帖子数 : 99
金币(Coin) : 4536
注册日期 : 2012-08-17
Similar topics
» The speex in linaro download webpage is a dead link!
» Speex configure error with latest make tools?
» Speex configure error with latest make tools?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum