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.

C55x WMA Callback function

Hello,

we are on the way to debug C55x WMA decoder program.

I have a question about WMA Callback function.

WMA_Version9_Decoder_C55X_UserGuide.pdf in C:\REL.50.A.WMA.D.STv9.C55X.01.00.00.001\50_A_WMA_D_1_00_00\C55X_WMA\Docs describes as follows,

-------------------------------------------------------------------------------------

4.2  Callback Function

WMA Decoder uses callback function to read input data from the file. Test
Application shall define the callback function and pointer to this function is
passed as a parameter to decoder. Below is the prototype of the callback
function.

Typedef tWMA_U32 (*tpCallBackFun)(tHWMAFileState
hstate, tWMA_U32 offset,
    tWMA_U32 num_bytes, tStreamData **ppData);

-------------------------------------------------------------------------------------

Could you please tell me about the meaning of above each parameters?

state:

offset:

num_bytes:

ppData:

I can not find any information above four parameters on WWW, WMA resource folders.

Best regards,

ay0689_2

  • Hi,

    hstate: tHWMAFileState is a (void *) pointer. Current implementation of the decoder app does not use it. As seen in the callback function WMAFileCBGetData, the only place where the same is used in the uploaded appcode. It may be typecast and modelled to store any additional information regarding the WMA audio file, something that can be done at the application level, and the option of it's usage left open to future apps built on the uploaded stub.

    offset: similar to the offset field used in standar file r/w functions (fread, fseek, fwrite). In the decoder app, it's being used to specify the number of bytes offset from the beginning of the WMA Audio file stream provided as input and pointed to by ifp (in WMAFileCBGetData())

    num_bytes: number of bytes after 'offset' to read in from the input WMA Audio file

    ppData: This collects the data read-in from the input WMA Audio file

    referred link for the audio codec s/w: http://www.ti.com/tool/c55xcodecs (directed from the c5515 device product page)