aftdll.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:4k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * aftdll.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * aftdll.dll header
- *
- * Author:
- * -------
- * John Chang (mtk00730)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #ifndef AFTDLL_DLL_H
- #define AFTDLL_DLL_H
- #ifdef __cplusplus
- #define EXPORT_FUNC extern "C" __declspec (dllexport)
- #else
- #define EXPORT_FUNC __declspec (dllexport)
- #endif
- /**
- return value:
- 0: success
- 1: fail
- **/
- typedef enum
- {
- AFT_SUCCESS = 0, // Success.
- AFT_FAILED, // General error.
- AFT_FLS_INVALID_PARAM, // length of freq, mag, or weight is zero
- AFT_FLS_FREQ_OUT_OF_BOUND, // frequencies not in [0, 1]
- AFT_FLS_NO_FREQ_ODD, // # of frequencies not even
- AFT_FLS_NO_FREQ_MAG_MISMATCH, // # of freq != # of mag
- AFT_FLS_NO_FREQ_WEIGHT_MISMATCH,// # of freq != 2 * (# of weight)
- AFT_FLS_FREQ_NOT_NONDESCREASING,// frequencies not nondescreasing
- AFT_FLS_EQUATION_INVALID_PARAM, // Parameters to Gaussin Elimination are invalid.
- AFT_FLS_EQUATION_NOT_SOLVABLE, // Equation is not solvable (singular or ..)
- AFT_FZ_INVALID_PARAM // length of newFir or freq is zero, or
- // Fs is zero
- } AFT_RESULT;
- EXPORT_FUNC const char*
- AFT_getErrorString(AFT_RESULT code);
- EXPORT_FUNC AFT_RESULT
- AFT_firls(
- int *pnLenNewFir,
- double **pdaNewFir,
- const int nOrd,
- const double *daFreq,
- const int nLenFreq,
- const double *daMag,
- const int nLenMag,
- const double *daWeight,
- const int nLenWeight);
- EXPORT_FUNC AFT_RESULT
- AFT_freqz(
- int *pnResp,
- double **pdaRespReal,
- double **pdaRespImag,
- const double *daNewFir,
- const int nLenNewFir,
- const double *daFreq,
- const int nLenFreq,
- const int nFs
- );
- EXPORT_FUNC void AFT_close();
- #endif