search for: tofloat

Displaying 3 results from an estimated 3 matches for "tofloat".

Did you mean: to_float
2004 Aug 06
0
Multiple Frames per Packet
...to[0], to.size( ) ) ); } // decode void GSpeexDecoder::decode( const char* from, int fromSize, vector<short>& to ) { GASSERTPUB( ); GASSERTPRE( from && fromSize ); // Read the input speex_bits_read_from( &_bits, (char*)from, fromSize ); // Decode static vector<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, &...
2004 Aug 06
2
C++ wrapper for speex
...code below and see where i could be having problems with. (this is the handler that processes captured audio) LRESULT CRecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; int buflen = lpHdr->dwBufferLength; //160 float * buf = toFloat(lpHdr->lpData, buflen); // Encode some audio int nRet = enc.encode(buf, buflen); unsigned char *compressed = enc.getOutput(); int clen = enc.getOutputLength(); int speechDetected = enc.getSpeechDetected(); // delete temporary float buffer...
2004 Aug 06
1
C++ wrapper for speex
...ould be having problems > with. (this is the handler that processes captured > audio) > > LRESULT CRecordSound::OnSoundData(WPARAM wParam, > LPARAM lParam) > { > LPWAVEHDR lpHdr = (LPWAVEHDR) lParam; > > int buflen = lpHdr->dwBufferLength; //160 > float * buf = toFloat(lpHdr->lpData, buflen); > > // Encode some audio > int nRet = enc.encode(buf, buflen); > unsigned char *compressed = enc.getOutput(); > int clen = enc.getOutputLength(); > int speechDetected = enc.getSpeechDetected(); > > // delete temporary float buffer &g...