REVISION
Definition in file CODEC_recordHdl.c.
#include "../SYSTEM/sys_hardware.h"
#include "../AUDIO/audio.h"
#include "../encoder/encoder.h"
#include "../FMXMIT/xmit_inc.h"
#include "codec.h"
#include "codec_assert.h"
Include dependency graph for CODEC_recordHdl.c:

Go to the source code of this file.
Functions | |
| void | CODEC_micPcmGet (int *pcmBuf, int len) |
| Function serves as the mic record PCM data get handle. | |
| void | CODEC_linePcmGet (int *pcmBuf, int len) |
| Function serves as the line-in record PCM data get handle. | |
| void | CODEC_linePcmPut (int *pcmBuf, int len) |
| Function serves as the line-in PCM data put handle. | |
| void | CODEC_recordHdlReset (void) |
| Function resets the encoder codec handle controls. | |
|
||||||||||||
|
Function serves as the line-in record PCM data get handle.
Definition at line 99 of file CODEC_recordHdl.c. References ENCODER_getInputBuf(), and ENCODER_putInputBuf(). Referenced by AUDIO_start(). 00100 {
00101 int * pEncDstLeft;
00102 int * pEncDstRight;
00103 int dataLen = len/2;
00104
00105 leftChannel = pcmBuf;
00106 rightChannel = pcmBuf + dataLen;
00107
00108 if(FALSE == ENCODER_getInputBuf(&pEncDstLeft, &pEncDstRight))
00109 {
00110 // Encoder can not keep up, out of sync.
00111 asm(" nop");
00112 }
00113 else
00114 {
00115 memcpy(pEncDstLeft, leftChannel, dataLen);
00116 memcpy(pEncDstRight, rightChannel, dataLen);
00117 ENCODER_putInputBuf();
00118 }
00119 }
|
Here is the call graph for this function:

|
||||||||||||
|
Function serves as the line-in PCM data put handle.
Definition at line 130 of file CODEC_recordHdl.c. References st_AUDIOENERGY::pFrame. Referenced by AUDIO_start(). 00131 {
00132 unsigned int i;
00133 int dataLen = len/2;
00134 int * pTmp;
00135 int * left;
00136 int * right;
00137
00138 pTmp = pcmBuf + dataLen;
00139 left = leftChannel;
00140 right = rightChannel;
00141
00142 for (i = 0; i < dataLen; i++)
00143 {
00144 *pcmBuf++ = *left;
00145 *pTmp++ = *right;
00146
00147 LeftInputEnergy.pFrame = left++;
00148 RightInputEnergy.pFrame = right++;
00149 AUDIO_energy(&LeftInputEnergy);
00150 AUDIO_energy(&RightInputEnergy);
00151 }
00152 }
|
|
||||||||||||
|
Function serves as the mic record PCM data get handle.
Definition at line 58 of file CODEC_recordHdl.c. References ENCODER_getInputBuf(), ENCODER_putInputBuf(), and st_AUDIOENERGY::pFrame. Referenced by AUDIO_start(). 00059 {
00060 unsigned short i;
00061 int * pDstLeft;
00062 int * pDstRight;
00063
00064 if(FALSE == ENCODER_getInputBuf(&pDstLeft, &pDstRight))
00065 {
00066 // Encoder can not keep up, out of sync.
00067 asm(" nop");
00068 }
00069 else
00070 {
00071 len = len/2;
00072 for (i = 0; i < len; i++)
00073 {
00074 // put the input data into the beginning of the taps array.
00075 //FIRMicTaps[0] = *pSrcLeft++;
00076 FIRMicTaps[2] = *pcmBuf++;
00077
00078 // apply LPF filter
00079 *pDstLeft = *pDstRight++ = CODEC_micLPF(&FIRMicRecord);
00080 LeftInputEnergy.pFrame =
00081 RightInputEnergy.pFrame = pDstLeft++;
00082 AUDIO_energy(&LeftInputEnergy);
00083 AUDIO_energy(&RightInputEnergy);
00084 }
00085 ENCODER_putInputBuf();
00086 }
00087 }
|
Here is the call graph for this function:

1.3.9.1