Displaying 2 results from an estimated 2 matches for "m_pospeexcompressstate".
Did you mean:
m_pospeexdecompressstate
2006 Sep 15
2
Constant noise in the background in realtime data
...//------------------------------------------------------------------------------------------
void OALCapture::Compress(ALchar* pData, int *iFrameSize, char* cComFrame)
{
// Reset speex bits before frame encode
speex_bits_reset(&m_oBits);
int nFrameSize = 0;
speex_encoder_ctl(m_poSpeexCompressState, SPEEX_GET_FRAME_SIZE, &nFrameSize);
// Our samples are 2 bytes each so number of samples is actually
// have the buffer size
int nBuffSize = BUFFERSIZE / 2;
// Now copy the samples into the float array that we will encode
for(int i = 0; i < nBuffSize; i++)
input[i] =...
2006 Sep 08
2
problem with compression and decompression
.../*Flush all the bits in the struct so we can encode a new frame*/
speex_bits_reset(&m_oBits);
/* Copy the data from ALchar array to a float array */
for(i = 0; i < BUFFERSIZE; ++i)
input[i] = pData[i];
/*Encode the frame*/
speex_encode(m_poSpeexCompressState, input, &m_oBits);
/*Copy the bits to an array of char that can be written*/
nbBytes = speex_bits_write(&m_oBits, cbits, BUFFERSIZE);
strcpy(cComFrame, cbits);
}
void OALCapture::Decompress(ALchar* pDecomData, int iFrameSize, char*
cComFrame)
{
speex_bits_...