search for: read_from_dev

Displaying 1 result from an estimated 1 matches for "read_from_dev".

2004 Aug 06
1
LIB usage
...mes 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...