Displaying 1 result from an estimated 1 matches for "comprbuf".
2004 Aug 06
2
Speex/Linux/ALSA
...0, 160, 200, 2000. It puts the data read into an unsigned char
array.
After capturing the data, I copy the unsigned char array into a float array
and follow the example code in sampleenc.c
speex_bits_reset(&bits);
speex_encode(state, floatbuf, &bits);
cbytes = speex_bits_write(&bits, comprbuf, BUFSIZE);
cbytes always returns 38 no matter what the frames are set to in the
ALSA snd_pcm_readi call.
I do know that valid sound in the unsigned char array returned from the
ALSA snd_pcm_readi call is less than 0x7A, and anything above 0x7A is
background noise or silence.
Q - is this inverted...