Displaying 1 result from an estimated 1 matches for "silenceframe".
2012 Jun 14
1
High CPU usage
Hi Mark,
Code below:
int16_t* samples;
int16_t* fbSilenceFrame;
void *fSpeexState;
float eng(0.f);
int speexFrameSize(0);
speex_encoder_ctl(speexState, SPEEX_GET_FRAME_SIZE, &speexFrameSize);
for (int i = 0; i < speexFrameSize; i++)
{
eng += samples[i] * samples[i];
}
if (eng / speexFrameSize < 3.f)
{
memcpy(samples, silenceFrame, speexFrame...