Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.0 KiB

  1. /******************************************************************************
  2. * sigproc.h *
  3. *-----------*
  4. * I/O library functions for extended speech files (vapi format)
  5. *------------------------------------------------------------------------------
  6. * Copyright (C) 1999 Entropic, Inc
  7. * Copyright (C) 2000 Microsoft Corporation Date: 03/02/00
  8. * All Rights Reserved
  9. *
  10. ********************************************************************* PACOG ***/
  11. #ifndef _SIGPROC_H_
  12. #define _SIGPROC_H_
  13. #ifndef M_PI
  14. #define M_PI 3.14159265358979323846
  15. #endif
  16. #define LN2 0.6931471806
  17. inline int LpcOrder( int p)
  18. {
  19. return (int)((p / 1000.0) + 2.5);
  20. }
  21. enum {LPC_ALFA=0, LPC_PARCOR} ;
  22. enum {WINDOW_HAMM, WINDOW_HANN, WINDOW_BLACK, WINDOW_RECT, WINDOW_BART};
  23. double* ComputeWindow (int iType, int iSize, bool bSymmetric);
  24. int WindowSignal (double* pdSamples, int iNumSamples, int iType, bool bSymmetric);
  25. double* GetDurbinCoef (double* pdData, int iNumData, int iOrder, int iCoefType, double *pdError);
  26. double* Autocor (double* x, int m, int iOrder);
  27. double* DurbinRecursion (double* pdAutoc, int iOrder, int iCoefType, double *pdError);
  28. void ParcorFilterSyn (double* pdData, int iNumData, double* pdParcor, double* pdMemory, int iOrder);
  29. void ParcorFilterAn (double* pdData, int iNumData, double* pdParcor, double* pdMemory, int iOrder);
  30. bool ParcorToAlfa (double* pdParcor, double* pdAlfa, int iOrder);
  31. double* Cepstrum (double *pdData, int iNumData, int iLpcOrder, int iCepOrder);
  32. void Alfa2Cepstrum (double* pdAlfa, int iNumAlfa, double* pdCepstrum, int iNumCepstrum);
  33. double EuclideanDist (double c1[], double c2[], int iLen);
  34. double Energy (double* pdData, int iNumData, int iWindType);
  35. int RemoveDc (double* pdSamples, int iNumSamples);
  36. int Resample (double* pdOriginal, int iNumOrig,
  37. int iInSampFreq, int iOutSampFreq,
  38. double** pdResampled, int* iNumResamp);
  39. int NonIntegerDelay (double* pdSamples, int iNumSamples, double dDelay);
  40. #endif