[speex-dev] LIB usage
Bruno David Rodrigues
bdr09166 at students.fct.unl.pt
Fri Feb 28 16:09:39 PST 2003
Hello,
I'm trying to use the speexlib but I just can't do it. I've made just like the
example (on the site) says. Some times I get SIGFAULT. Also, I'm reading the
input_frames from /dev/dsp (directly). What is missing here?
speex_bits_init(&bits);
enc_state = speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size);
for(n=0; n<100; n++)
{
read_from_dev(fd1, (float *)input_frame, 1024);
speex_bits_reset(&bits);
speex_encode(enc_state, input_frame, &bits);
nBytesFrame = speex_bits_nbytes(&bits);
nbBytes = speex_bits_write(&bits, byte_ptr, nBytesFrame);
write_to_file(fd2, byte_ptr, nbBytes);
}
speex_bits_destroy(&bits);
speex_encoder_destroy(enc_state);
<p>Thank you
Bruno Rodrigues
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Speex-dev
mailing list