This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WMA Decoder

Expert 2780 points

Hello

I have been testing the WMA Decoder, but there was a behavior that are considered to be defects in it.

When I run "WMAFileSeek (msec)", and is called the "WMAFileCBGetData(offset, num_bytes) ", it is run the function repeatedly, it does not end.

By the parameter to be set to "WMAFileSeek() ", this behavior occurs.
Are there any restrictions, such as the value of this parameter?
Is there a cause to the other?

Is there a known bug in the decoder of WMA?


Version:
WMA Decoder on C55x Version 01.00.00

  • Hi,

    As mentioned in the Release note there is no known issues / bug in the decoder of WMA.

    Have you taken care of the below requirements :

    This API is used to seek to a specified duration in the input file.

    WMAFileSeek() must only be called after a successful call to FileDecodeInit() and decode() and must never be called after a call to algFree().

    The first argument to WMAFileSeek () is time position to seek in milliseconds from the beginning of the stream.

    The second argument to WMAFileSeek () is a handle to an algorithm instance.

    The return value of WMAFileSeek () is the time position from the beginning of the clip, in milliseconds.

    Also, there are pre  and Post conditions that needs to be followed too.

    Regards

     Vasanth

  • Thanks

    However, I tried to do that as instructed, but I can not skip a number of specific.
    Code that was confirmed as follows.
     
    ( TestAppDecoder.c modified)

    int DECODE_WMAFileSeek(unsigned long , void * );

    unsigned long delay=0;  // OK msec
    //unsigned long delay=46500;  // NG msec
    int skip_flag;

    int main()
    {
     
            :
     
            err = WMAFileDecodeInit(dec);
            if ( err != cWMA_NoErr ) {
                printf("Failed in initializing\n");
            }

            //DECODE_WMAFileSeek(delay, dec); // test
            skip_flag = 0;
            //decode file
            while(1)
            {
                err = DECODE_decode(dec,(Int *)&outputBuf, &outArgs);
                DECODE_getStatus(dec, &decStatus);

                if( !skip_flag )
                {
                    DECODE_WMAFileSeek(delay, dec);
                    skip_flag = 1;
                }

                if (err == cWMA_NoErr) {
                     WriteToFile(ofp, (Uns*)outputBuf, decStatus);
                 }

            :

    After I changed the "delay", I run the program.
    In WMAFileSeek(), to repeat the reading of the file, the program will not come back.

    Header is what can not be confirmed, the program has continued to read repeatedly, and around a header.

    I have generated a number of 46500,96001 at least a file that I have to experiment.
     

    regards