DECODER__mp3media.c File Reference


Detailed Description

This module provides mp3 decoder media data access handle.

REVISION

Definition in file DECODER__mp3media.c.

#include "../SYSTEM/sys_hardware.h"
#include "../codec/codec.h"
#include "../AUDIO/audio.h"
#include "decoder.h"

Include dependency graph for DECODER__mp3media.c:

Include dependency graph

Go to the source code of this file.

Functions

USHORT DECODER__mp3media (void)
 Function serves as the decoder media access task handle.


Function Documentation

USHORT DECODER__mp3media void   ) 
 

Function serves as the decoder media access task handle.

Returns:
Data length in words that are added into bitstream.

Definition at line 38 of file DECODER__mp3media.c.

References Audio, Decoder, DECODER_getData(), st_AUDIO::fptr, and st_DECODER::inputBitstrm.

00039 {
00040     USHORT *        pDst;
00041     USHORT          strmLen;
00042     USHORT          dataLen = 0;
00043     
00044     BITSTRM_pack(Decoder.inputBitstrm);
00045     strmLen = BITSTRM_numWordsFree(Decoder.inputBitstrm); 
00046     
00047     if( (strmLen > READ_THRESHOLD) )
00048     {
00049         Audio.fptr = mp3EndOfReadPtr;
00050         pDst = (unsigned short *)BITSTRM_writePtr(Decoder.inputBitstrm);
00051         dataLen = DECODER_getData((int*)pDst, Audio.fptr, strmLen);
00052         Audio.fptr += dataLen;
00053         mp3EndOfReadPtr = Audio.fptr;
00054         /* Add to decoder bitstream object. */
00055         BITSTRM_add(Decoder.inputBitstrm, dataLen);  
00056     }   
00057     return dataLen; 
00058 }

Here is the call graph for this function:


Generated on Wed Jan 19 01:12:54 2005 for neuros-firmware by  doxygen 1.3.9.1