📄 ilec.h
字号:
/*------------------------------------------------------------------------*
* *
* THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY *
* INFORMATION. IF PUBLICATION OCCURS, THE FOLLOWING NOTICE APPLIES: *
* "COPYRIGHT 2001 MIKET DSP SOLUTIONS, ALL RIGHTS RESERVED" *
* *
*-------------------------------------------------------------------------*/
#ifndef ILEC_
#define ILEC_
#include <std.h>
#include <ialg.h>
/*--------------------- public defs ---------------------------------------*/
#define ILEC_FR_SZ (40)
#define ILEC_FR_MS (5)
typedef struct ILEC_Obj {
struct ILEC_Fxns *fxns;
} ILEC_Obj;
typedef struct ILEC_Obj *ILEC_Handle;
/*
* ------- control interface ---------
*
* use it while calling algControl()
*/
/* definition of Cmd param of LEC_control(), to be or'ed */
#define ILEC_CMD_OFF_MASK (0x0001)
#define ILEC_CMD_RESET_MASK (0x0002)
#define ILEC_CMD_DETECT_HITX_MASK (0x0004)
#define ILEC_CMD_NOADAPT_MASK (0x0008)
#define ILEC_CMD_TONE_ECHO_MASK (0x0010)
#define ILEC_CMD_PRESERVE_FLT_MASK (0x0020)
#define ILEC_CMD_LOOPBACK_MASK (0x0040)
#define ILEC_CMD_HIPASS_MASK (0x0080)
#define ILEC_CMD_NLP_OFF_MASK (0x0100)
#define ILEC_CMD_CLR_HITX_DT_MASK (0x0200)
/* Configuration of LEC */
/* All relevant parameters are expressed in dB, scaled up with a coeff,
so that
1 dB corresponds to 512/3.0103 ~ 170.083 ~ 170
The scaling was chosen as a compromise:
- to make log scale computation fast and simple;
- to allow enough breathing space to run averaging;
- leave some headroom for data manipulation;
- allow non-integer values;
- 0 corresponds to 0dBm signal (averaged over 40 samples),
mu-law data (8159*4 max);
- negative values for attenuated signal;
- min value corresponds to approx. -82.5 dBm;
- precision is about 0.25 dB. */
#define ILEC_1DB (170)
/*
While setting configuration is left to discretion of the
user, it is recommended to be aware of the consequences.
The run-time configuration fields include:
*/
typedef struct ILEC_tCfg {
Int uControl;
Int sErlMin;
Int sTxMax;
Int sClipThr;
Int sToneDetectThr;
Int sToneReleaseThr;
} ILEC_tCfg;
/*
* ======== ILEC_Params ========
* This structure defines the parameters necessary to create an
* instance of a MF object.
*
*/
typedef struct ILEC_Params {
Int size; /* sizeof the whole parameter struct */
ILEC_tCfg *pCfg;
} ILEC_Params;
typedef struct ILEC_Status {
Int size; /* sizeof the whole parameter struct */
ILEC_tCfg *pCfg; /* in: ptr to cfg to update. used if and only if CMD_CFG indicated */
} ILEC_Status;
/*
* ======== ILEC_Fxns ========
* By convention the name of the variable is LEC_MIKET_ILEC, where
* MIKET is the vendor name.
*/
typedef struct ILEC_Fxns {
IALG_Fxns ialg;
/* functions returns report word described above */
Int (*algProcess)(IALG_Handle handle, Int *pRcv, Int *pSnd);
} ILEC_Fxns;
/*--------------------- local defs ----------------------------------------*/
/*--------------------- public vars ---------------------------------------*/
/*--------------------- local vars ----------------------------------------*/
/*--------------------- local functions -----------------------------------*/
/*--------------------- public functions ---------------------------------*/
#endif /* ILEC_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -