DECODER_config.c File Reference


Detailed Description

This module initializes the decoder interface.

REVISION

Definition in file DECODER_config.c.

#include "../SYSTEM/sys_hardware.h"
#include "../SYSTEM/sys_assert.h"
#include "../codec/codec.h"
#include "../coder/coder.h"
#include "decoder.h"

Include dependency graph for DECODER_config.c:

Include dependency graph

Go to the source code of this file.

Functions

BOOL DECODER_config (DEC_TYPE eType)
 Function configures the decoder module.
void DECODER_releaseObj (void)
 Function releases all decoder allocated objects.

Variables

st_DECODER Decoder
 Decoder globals.


Function Documentation

BOOL DECODER_config DEC_TYPE  eType  ) 
 

Function configures the decoder module.

Parameters:
eType Decoder type.

Definition at line 97 of file DECODER_config.c.

References st_CODER::cache, st_CODER::cacheInit, Decoder, st_DECODER::flag, st_CODER::mediaInit, st_DECODER::pipe, PIPE_reset(), st_CODER::subcoder, SYS_die(), and st_DECODER::type.

Referenced by AUDIO_config().

00098 {
00099     Decoder.type = eType;
00100     
00101     Coder.subcoder  = DECODER__nullsubcoder;
00102     Coder.cache     = DECODER_cache;
00103     Coder.cacheInit = DECODER_cacheInit;
00104     Coder.mediaInit = NULL;
00105     
00106     _decPipeBuf = (int*)malloc(_DEC_PIPE_BUF_LEN);
00107     if(NULL == _decPipeBuf) SYS_die(SYS_DECODER_CONFIG);
00108     
00109     switch(eType)
00110     {
00111         #ifdef WAV_SUPPORT
00112         case DECWAV:    _wavConfig();       break;
00113         #endif // WAV_SUPPORT
00114         case DECMP3:    _mp3Config();       break;
00115         #ifdef WMA_SUPPORT
00116         case DECWMA:    _wmaConfig();       break;
00117         #endif // WMA_SUPPORT
00118         #ifdef OGG_SUPPORT
00119         case DECOGG:    _oggConfig();       break;          
00120         #endif //OGG_SUPPORT
00121     }
00122    
00123     /* Reset the decoder pipe. */
00124     PIPE_reset(&Decoder.pipe);
00125    
00126     /* Clear decoder file flag. */
00127     Decoder.flag = 0;
00128     
00129     return TRUE;
00130 }

Here is the call graph for this function:


Variable Documentation

st_DECODER Decoder
 

Decoder globals.

Note that this global will be used by PCM SWIs, it has to be resident all the time.

Definition at line 49 of file DECODER_config.c.

Referenced by AUDIO_setFilePtr(), DECODER__mp3(), DECODER__mp3first(), DECODER__mp3media(), DECODER__ogg(), DECODER__oggfirst(), DECODER__oggmedia(), DECODER__wav(), DECODER__wavdecode(), DECODER__wavfirst(), DECODER__wavmedia(), DECODER__wavReadHeader(), DECODER__wma(), DECODER__wmainit(), DECODER__wmamedia(), DECODER__wmatask(), DECODER_config(), and DECODER_main().


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