search for: outputsize

Displaying 6 results from an estimated 6 matches for "outputsize".

Did you mean: output_size
2011 Nov 17
1
Just getting noise
...e I'm not sure why the sample I was working off of was converting the shorts to floats then calling the other encode/decode methods. Based off of your suggestions I tried the following but I get the same result. virtual Enigma::u8* Encode(Enigma::u8* inputBuffer,size_t inputSize, size_t& outputSize) { speex_bits_reset(&mBits); speex_encode_int(mState, (Enigma::s16*)inputBuffer, &mBits); speex_bits_insert_terminator(&mBits); outputSize = speex_bits_nbytes(&mBits); /*Copy the bits to an array of char that can be written*/ Enigma::u8* cbits = new Enigma::u8[o...
2011 Nov 16
2
Just getting noise
...ate is created in the constructor and destroyed in the destructor of the object. However I'm still getting the same issue although I'm sure that would have bit me sooner or later. The new code is as follows. virtual Enigma::u8* Encode(Enigma::u8* inputBuffer,size_t inputSize, size_t& outputSize) { short *in=(short*)inputBuffer; float *input = new float[(inputSize/2)](); int nbBytes; int i; for (i=0;i<(inputSize/2);i++) { input[i]=in[i]; } /*Flush all the bits in the struct so we can encode a new frame*/ speex_bits_reset(&mBits); /*Encode t...
2011 Nov 16
2
Just getting noise
...;m using. The audio data is from OpenAL and is 16000 frequency, 16bits, and the frames being passed to the included functions are 640 bytes which if my math is right (very well may not be) that is 20ms. ? ? ? ? ? ? ? ?virtual Enigma::u8* Encode(Enigma::u8* inputBuffer,size_t inputSize, size_t& outputSize) ? ? ? ? ? ? ? ?{ ? ? ? ? ? ? ? ? ? ? ? ?short *in=(short*)inputBuffer; ? ? ? ? ? ? ? ? ? ? ? ?float *input = new float[(inputSize/2)](); ? ? ? ? ? ? ? ? ? ? ? ?int nbBytes; ? ? ? ? ? ? ? ? ? ? ? ?/*Holds the state of the encoder*/ ? ? ? ? ? ? ? ? ? ? ? ?void *state; ? ? ? ? ? ? ? ? ? ? ? ?/*Holds...
2011 Nov 16
0
Just getting noise
...ctor and destroyed in the destructor of the object. However I'm > still getting the same issue although I'm sure that would have bit me > sooner or later. > The new code is as follows. > > virtual Enigma::u8* Encode(Enigma::u8* inputBuffer,size_t inputSize, > size_t& outputSize) > { > short *in=(short*)inputBuffer; > float *input = new float[(inputSize/2)](); > int nbBytes; > int i; > > for (i=0;i<(inputSize/2);i++) > { > input[i]=in[i]; > } > > /*Flush all the bits in the struct so we can encode a...
2005 Jul 20
1
Speex Windows from 1.1.6 source
...utputBuf,0,(200 * sizeof(float))); /*Copy the 16 bits values to float so Speex can work on them*/ for (i=0;i<iIndex;i++){ /* float */pfEncBuf[i]=/* short */psInput[i]; } /*Encode the frame*/ speex_encode(encState,pfEncBuf, &Encbits); memset(OutputBuf,0,outputSize); /*Copy the bits to an array of char that can be written*/ iEncBytes = speex_bits_write(&Encbits, OutputBuf, outputSize); return iEncBytes; /**************** Decode ******************/ /* Flush all the bits in the struct so we can code a new frame */ speex_b...
2011 Nov 16
0
Just getting noise
...penAL and is > 16000 frequency, 16bits, and the frames being passed to the included > functions are 640 bytes which if my math is right (very well may not > be) that is 20ms. > > virtual Enigma::u8* Encode(Enigma::u8* > inputBuffer,size_t inputSize, > size_t& outputSize) > { > short *in=(short*)inputBuffer; > float *input = new float[(inputSize/2)](); > int nbBytes; > /*Holds the state of the encoder*/ > void *state; &...