search for: samples_per_frame

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

2004 Aug 06
1
openh323 conflict; can speex_encode take short?
openh323 speexcodec.cxx has: BOOL SpeexCodec::EncodeFrame(BYTE * buffer, unsigned & length) { // convert PCM to float float floatData[SAMPLES_PER_FRAME]; PINDEX i; for (i = 0; i < SAMPLES_PER_FRAME; i++) floatData[i] = sampleBuffer[i]; // encode PCM data in sampleBuffer to buffer speex_bits_reset(bits); speex_encode(coder_state, floatData, bits); ................................. which does not compile on gcc-3.3.3: peexcodec.c...
2011 Nov 17
1
Just getting noise
...? ? ? ? ? ?while( frames > 0 && (ret = > speex_decode_int(dec_state, &bits, (int16_t *)((char*)data+length))) == 0 ) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?length += BYTES_PER_FRAME; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?samples -= SAMPLES_PER_FRAME; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?--frames; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?jitter_buffer_tick( jitter ); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?lost_frames = 0; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > > You can ignore the lost_frames. That just gets incremented if...
2011 Nov 16
2
Just getting noise
Alright noted, I changed me code so that the state 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;
2011 Nov 16
0
Just getting noise
...while( frames > 0 && (ret = speex_decode_int(dec_state, &bits, (int16_t *)((char*)data+length))) == 0 ) { length += BYTES_PER_FRAME; samples -= SAMPLES_PER_FRAME; --frames; jitter_buffer_tick( jitter ); lost_frames = 0; } You can ignore the lost_frames. That just gets incremented if there isn't da...