cancel
Showing results for 
Search instead for 
Did you mean: 

Speex Library

dbouvier
Associate II
Posted on April 22, 2014 at 16:19

Hi all,

I'm trying to use the speex library on a STMF205. I have downloaded the AN2812 and the stsw-stm32017 example.

I have copied code example into  my project  :

    /* Speex encoding initializations */

    speex_bits_init(&bits);

    enc_state = speex_encoder_init(&speex_nb_mode);

    speex_encoder_ctl(enc_state, SPEEX_SET_VBR, &vbr);

    speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY,&quality);

    speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &complexity);

    /* speex decoding intilalization */

    dec_state = speex_decoder_init(&speex_nb_mode);

    speex_decoder_ctl(dec_state, SPEEX_SET_ENH, &enh);

    

 

 

    /* Flush all the bits in the struct so we can encode a new frame */

    speex_bits_reset(&bits);

    /* Encode the frame */

    speex_encode_int(enc_state, (spx_int16_t*)IN_Buffer[0], &bits);

    /* Copy the bits to an array of char that can be decoded */

    speex_bits_write(&bits, (char *)out_bytes, ENCODED_FRAME_SIZE);

    /* Copy the encoded data into the bit-stream struct */

    speex_bits_read_from(&bits, (char *)out_bytes, ENCODED_FRAME_SIZE);

    /* Decode the data */

    speex_decode_int(dec_state, &bits, (spx_int16_t*)OUT_Buffer[0]);

The compilation is ok but I have a MemManage_Handler during the encoding.

Do you have anyone an idea ? As anyone already used this library (or another one) on STM32F205.

Thanks for all.

David

2 REPLIES 2
Posted on April 22, 2014 at 16:28

Where does SCB->MMFAR point to, when the fault occurs?

JW

dbouvier
Associate II
Posted on April 22, 2014 at 16:48

When the fault occurs, I have :

PSR = 20003c30

BFAR = e000ed38

CFSR = 0

HFSR = 0

DFSR = 0

AFSR = 0

SCB_SHCSR = 0

SCB->MMFAR = e000ed34

Thanks