libcm is a C development framework with an emphasis on audio signal processing applications.
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.

cmOnset.h 938B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef cmOnset_h
  2. #define cmOnset_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. enum
  7. {
  8. kOkOnRC = cmOkRC,
  9. kDspProcFailOnRC,
  10. kDspAudioFileFailOnRC,
  11. kDspTextFileFailOnRC,
  12. };
  13. typedef cmRC_t cmOnRC_t;
  14. typedef cmHandle_t cmOnH_t;
  15. typedef struct
  16. {
  17. double wndMs;
  18. unsigned hopFact;
  19. unsigned audioChIdx;
  20. unsigned wndFrmCnt; //
  21. double preWndMult; //
  22. double threshold; //
  23. double maxFrqHz; //
  24. double filtCoeff; //
  25. } cmOnsetCfg_t;
  26. extern cmOnH_t cmOnsetNullHandle;
  27. cmOnRC_t cmOnsetInitialize( cmCtx_t* c, cmOnH_t* hp );
  28. cmOnRC_t cmOnsetFinalize( cmOnH_t* hp );
  29. bool cmOnsetIsValid( cmOnH_t h );
  30. cmOnRC_t cmOnsetExec(
  31. cmOnH_t h,
  32. const cmOnsetCfg_t* cfg,
  33. const cmChar_t* inAudioFn,
  34. const cmChar_t* outAudioFn,
  35. const cmChar_t* outTextFn );
  36. cmOnRC_t cmOnsetTest( cmCtx_t* c );
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif