search for: _dec_state

Displaying 1 result from an estimated 1 matches for "_dec_state".

Did you mean: dec_state
2004 Aug 06
0
Multiple Frames per Packet
...ctor<float> toFloat; int frame = 0; do { // Allocate more data, if needed if( (frame+1)*_frameSize > (int)toFloat.size( ) ) // Grow as _frameSize * 2^n if( !toFloat.size( ) ) toFloat.resize( _frameSize ); else toFloat.resize( toFloat.size( ) * 2 ); } while( !speex_decode( _dec_state, &_bits, &toFloat[ frame++ * _frameSize ] ) ); // Finally, convert to back to short data to.resize( frame * _frameSize ); const float* src = &toFloat[0]; short* dst = &to[0]; int c = to.size( ); while( c-- ) { *dst++ = (short)*src++; } }