Displaying 2 results from an estimated 2 matches for "speex_frame_size".
2007 Apr 25
0
echo cancellation on Blackfin DSK
...//for stereo encoding
short *out_left = out_buffer_calc; //for stereo encoding
short *out2_buffer_calc;
if (SPEEX_DISABLED == g_iSpeexEnabled) //Activated by a pushbutton
{
memcpy((void *)out, (void *)in,
SPEEX_FRAME_SIZE*NUM_CHANNELS*sizeof(ARTYP_16BITS));
}
else //Speex is enabled so do a lot more work
{
#ifndef ACTIVATE_STEREO
// Demux the stereo stream
for(i = 0; i < SPEEX_FRAME_SIZE; i++)
{
*in_left++ = *in++; // channel 1
in++; // channel 2
}
in_left = in_bu...
2011 Jul 26
0
More frames in one packet
...have to call speex_decode_int() for every frame inside the packet? And how can I get the number of bytes speex_decode_int() wrote into the destination buffer?
Here small code snippets of my implementation:
//**********************************************
// Encoding:
short* Frame = (short*)malloc(speex_frame_size);
speex_bits_reset(enc_bits);
for(unsigned int i = 0; RecBufferLen > speex_frame_size * i; i++)
{
memcpy(Frame, RecBuffer + speex_frame_size * i, speex_frame_size);
speex_encode_int(enc_state, Frame, enc_bits);
}
free((void*)Frame);
return speex_bits_write(enc_bits, SendBuffer, SendBufferLen)...