search for: encodedbytes

Displaying 4 results from an estimated 4 matches for "encodedbytes".

2009 Sep 02
3
voice sound like robot voice :)
...ffersize = (int)( pCodecRawBufferCur - pCodecRawBuffer ); // do we have enough data for encoding? if ( buffersize < encoderFrameSize ) { //pLog->Add("codec: encoder: return: buffersize: %d: needtoencode %d", buffersize, encoderFrameSize); return 0; } int encodedbytes = 0; int pos = 0; // while we have enough data while( (uint)( pCodecRawBufferCur - pCodecRawBuffer ) >= encoderFrameSize ) { // copy data from temporary buffer to codec buffer memcpy( pCodecBuffer, pCodecRawBuffer, encoderFrameSize ); // move memory of temporary b...
2009 Sep 03
1
Speex-dev Digest, Vol 64, Issue 2
...ugh data for encoding? > > if ( buffersize < encoderFrameSize ) > > { > > //pLog->Add("codec: encoder: return: buffersize: %d: needtoencode > > %d", buffersize, encoderFrameSize); > > return 0; > > } > > > > int encodedbytes = 0; > > int pos = 0; > > // while we have enough data > > while( (uint)( pCodecRawBufferCur - pCodecRawBuffer ) >= > > encoderFrameSize ) > > { > > // copy data from temporary buffer to codec buffer > > memcpy( pCodecBuffer, pCo...
2009 Apr 13
0
encoding -> decoding doesnt work
...nt j = 0; j < amountSamples/frame_size; j++ ) { // Encode the voice data speex_bits_reset(&bits); speex_encode_int(enc_state, (short*)((char*)p_raw1 + j*frame_size*sizeof(short)), &bits); int nBytes = speex_bits_nbytes(&bits); char *encodedArray = new char[nBytes]; int encodedBytes = speex_bits_write(&bits,encodedArray,nBytes); printf("Encoded: %d \t",encodedBytes); total += encodedBytes; encoded = (char*)realloc( encoded, total ); memcpy( (encoded+total-encodedBytes), encodedArray, encodedBytes ); } printf("\n\nTotally: %u\nper Item: %f\n\n&quot...
2009 Sep 03
0
voice sound like robot voice :)
...Buffer ); > > // do we have enough data for encoding? > if ( buffersize < encoderFrameSize ) > { > //pLog->Add("codec: encoder: return: buffersize: %d: needtoencode > %d", buffersize, encoderFrameSize); > return 0; > } > > int encodedbytes = 0; > int pos = 0; > // while we have enough data > while( (uint)( pCodecRawBufferCur - pCodecRawBuffer ) >= > encoderFrameSize ) > { > // copy data from temporary buffer to codec buffer > memcpy( pCodecBuffer, pCodecRawBuffer, encoderFrameSize ); &...