search for: encoder_st

Displaying 2 results from an estimated 2 matches for "encoder_st".

Did you mean: encoder's
2004 Dec 28
5
Sound distorted after normalized.
> 16 bit ints have a range of -32768 to 32767. If you divide > -32768 by 32767.0 you end up with -1.00003051850948 which > is a bad thing. > > Try normalizing with a value of 32768.0. No. Speex expects values in the +-32767 range, not +-1.0. Just converting from int16 to float *is* the right thing to do. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
2006 Aug 01
0
new to speex's!
...ode n times before writing the data stream. for( int i =0 ; i < number_of_frames-1; i ++) { /// pack a frame for(int j=0; j< FRAME_SIZE; j++ ) { frame[j] = data_as_floats [j+offset]; } // this enoced the data speex_encode( encoder_state, frame , bits ); // increase the offset offset+=FRAME_SIZE; } //speex_encode( encoder_state, frame , bits ); /// write teh stream out. int bytes_to_write = speex_bits_nbytes( bits ); /// transform from float to char* to write. The termination code is acutoma...