REVISION
Definition in file DECODER__wmafirst.c.
#include "../SYSTEM/sys_hardware.h"
#include "../SYSTEM/sys_assert.h"
#include "../codec/codec.h"
#include "../coder/coder.h"
#include "../TISTD/wma_ti.h"
#include "decoder.h"
Include dependency graph for DECODER__wmafirst.c:

Go to the source code of this file.
Functions | |
| BOOL | DECODER__wmainit (void) |
| Function check to init WMA decoder input bit stream. | |
| BOOL | DECODER__wmafirst (void) |
| Function bridges the WMA subcoder to main decoder handle. | |
|
|
Function bridges the WMA subcoder to main decoder handle.
Definition at line 90 of file DECODER__wmafirst.c. References st_CODER::subcoderInit. 00091 {
00092 if(Coder.subcoderInit) return FALSE;
00093 else return TRUE;
00094 }
|
|
|
Function check to init WMA decoder input bit stream.
Definition at line 41 of file DECODER__wmafirst.c. References Audio, st_DECODER::averageWordRate, st_DECODER::decode, st_DECODER::decodeBitstrm, Decoder, DECODER__wmatask(), st_AUDIO::duration, st_AUDIO::file, st_DECODER::firstPacketOffset, st_DECODER::flag, st_AUDIO::offset, st_PCM::sampleRate, File::size, and st_DECODER::status. 00042 {
00043 USHORT strmLen;
00044
00045 BITSTRM_pack(Decoder.decodeBitstrm);
00046 strmLen = BITSTRM_numDataWords(Decoder.decodeBitstrm);
00047 if(strmLen > WMA_MAX_INPUT_FRAME_SIZE)
00048 {
00049 // Decode to validate audio data and return status.
00050 WMA_task();
00051 DECODE_getStatus(Decoder.decode, &Decoder.status);
00052 BITSTRM_pack(Decoder.decodeBitstrm);
00053
00054 if(Decoder.status.isValid)
00055 {
00056 PCM_samplerateChanged();
00057 Pcm.sampleRate = Decoder.status.sampleRate;
00058
00059 Decoder.averageWordRate =
00060 (Audio.file.size-FIRST_PACKET_OFFSET)/(Audio.duration+1);
00061 if(0 == Decoder.averageWordRate)
00062 Decoder.averageWordRate = Decoder.status.bitRate>>4;
00063
00064 // Aligned on packet length boundary.
00065 wmaFastFwdLen = 5L*(Decoder.status.bitRate>>4);
00066 wmaFastFwdLen /= Decoder.status.frameSize;
00067 wmaFastFwdLen *= Decoder.status.frameSize;
00068 Decoder.firstPacketOffset = FIRST_PACKET_OFFSET;
00069
00070 // Seek to start offset.
00071 if(Audio.offset)
00072 {
00073 Decoder.flag |= DEC_FFWD|DEC_MEDIASEEK;
00074 DECODER__wmatask();
00075 }
00076
00077 return TRUE;
00078 }
00079 }
00080 return FALSE;
00081 }
|
Here is the call graph for this function:

1.3.9.1