[Speex-dev] frame_size parameter
danflu at uninet.com.br
danflu at uninet.com.br
Tue Mar 10 15:12:43 PDT 2009
Hi,
I'm using the echo cancellation api and I would like to
clarify the 'frame_size' parameter used in
speex_echo_state_init(frame_size,filter_length).
In the 'docs' it says:
"...where frame_size is the amount of data (in samples)you
want to process at once..."
So... here are my questions:
if I use stereo input/output do I have to put the samples
doubled ?
For example... if I'm using 100 ms on mono 8khz I just pass
800 as 'frame_size', but if I switch on using stereo will I
have to put 1600 samples to represent the same 100 ms? I'm
looking at the code of 'speex_echo_playback' and I see the
following snippet:
...
for (i=0;i<st->frame_size;i++)
st->play_buf[st->play_buf_pos+i] = play[i];
...
So... if my buffer is stereo and I put 800 samples as
'frame_size' the previous loop will just copy half of the
'play' buffer data (50 ms) or am I missing something ?
Thanks in advance,
Daniel
More information about the Speex-dev
mailing list