pvdefs.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* pvdefs.h */
  2. /*
  3. * Copyright (c) 2000,2022 Richard Dobson and Composers Desktop Project Ltd
  4. * http://www.rwdobson.com
  5. * http://www.composersdesktop.com
  6. *
  7. This file is part of the CDP System.
  8. The CDP System is free software; you can redistribute it
  9. and/or modify it under the terms of the GNU Lesser General Public
  10. License as published by the Free Software Foundation; either
  11. version 2.1 of the License, or (at your option) any later version.
  12. The CDP System is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public
  17. License along with the CDP System; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  19. 02111-1307 USA
  20. *
  21. */
  22. #ifndef __PVDEFS_H_INCLUDED
  23. #define __PVDEFS_H_INCLUDED
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. #define VERY_TINY_VAL (1e-20)
  28. #define ODD(x) ((x)&1)
  29. #define EVEN(x) (!ODD(x))
  30. #define CHAN_SRCHRANGE_F (4)
  31. #ifndef max
  32. #define max(a, b) (((a) > (b)) ? (a) : (b))
  33. #endif
  34. #ifndef min
  35. #define min(a, b) (((a) < (b)) ? (a) : (b))
  36. #endif
  37. /* for future reference: IEEE_DOUBLE not implemented yet for PVOCEX */
  38. enum pvoc_wordformat { PVOC_IEEE_FLOAT, PVOC_IEEE_DOUBLE};
  39. typedef enum pvoc_mode { PVPP_NOT_SET,PVPP_OFFLINE,PVPP_STREAMING} pvocmode;
  40. /* the old CARL pvoc flags */
  41. typedef enum pvoc_wfac {PVOC_O_W0,PVOC_O_W1,PVOC_O_W2,PVOC_O_W3,PVOC_O_DEFAULT} pvoc_overlapfac;
  42. typedef enum pvoc_scaletype {PVOC_S_TIME,PVOC_S_PITCH,PVOC_S_NONE} pv_scaletype;
  43. typedef enum pvoc_frametype { PVOC_AMP_FREQ,PVOC_AMP_PHASE,PVOC_COMPLEX } pv_frametype;
  44. typedef enum pvoc_windowtype {PVOC_DEFAULT,
  45. PVOC_HAMMING,
  46. PVOC_HANN,
  47. PVOC_KAISER,
  48. PVOC_RECT,
  49. PVOC_CUSTOM} pv_wtype;
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif