[Speex-dev] ARM7 Speex decoder

pberna at iol.it pberna at iol.it
Mon Mar 20 03:25:18 PST 2006

Dear All

I ported the speex decoder in LPC2000 ARM7 family. 
Because I fetched the .ogg file from and external MMC card, I can only red a limited memory block 

1) Can I decode only a block of a speex file at time ?

    /*Create a new decoder state in narrowband mode*/
    state = speex_decoder_init(&speex_nb_mode);
    /*Set the perceptual enhancement on*/
    speex_decoder_ctl(state, SPEEX_SET_ENH, &tmp);

    /* Get frame size */
    speex_decoder_ctl(state, SPEEX_GET_FRAME_SIZE, &nbBytes);

    /*Initialization of the structure that holds the bits*/

            lb = file_read(&file, nbBytes, (void *)cbits);
            /*Copy the data into the bit-stream struct*/

            speex_bits_read_from(&bits, cbits, nbBytes);
            /*Decode the data*/

            speex_decode(state, &bits, output);

            /* now I reder the block */

          } while(lb); /* do */

2) What is the third parameter of the speex_bits_read_from function ? Can I put there a fraction of the ogg. file size ?
I red the frame size from the speex_decoder_ctl "nbBytes", and than I use it to get a frame from the input file. Is it right ?

3) With the previous code I get the error message 
warning: Invalid mode encountered: corrupted stream?
Any suggestion ? Where I'm wrong ?

4) Do anyone know if and when will exist a full fixed point version of the speex ? and an optimized version for ARM7 ?

Thank you
Best Regards

More information about the Speex-dev mailing list