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.

r8bconf.h 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. //$ nobt
  2. //$ nocpp
  3. /**
  4. * @file r8bconf.h
  5. *
  6. * @brief The "configuration" inclusion file you can modify.
  7. *
  8. * This is the "configuration" inclusion file for the "r8brain-free-src"
  9. * sample rate converter. You may redefine the macros here as you see fit.
  10. *
  11. * r8brain-free-src Copyright (c) 2013-2014 Aleksey Vaneev
  12. * See the "License.txt" file for license.
  13. */
  14. #ifndef R8BCONF_INCLUDED
  15. #define R8BCONF_INCLUDED
  16. #if defined( _WIN32 ) || defined( _WIN64 )
  17. #define R8B_WIN 1
  18. #elif defined( __APPLE__ )
  19. #define R8B_MAC 1
  20. #else // defined( __APPLE__ )
  21. #define R8B_LNX 1 // Assume Linux (Unix) platform by default.
  22. #endif // defined( __APPLE__ )
  23. #if !defined( R8B_FLTLEN )
  24. /**
  25. * This macro defines the default fractional delay filter length. Macro is
  26. * used by the r8b::CDSPResampler class.
  27. */
  28. #define R8B_FLTLEN 28
  29. #endif // !defined( R8B_FLTLEN )
  30. #if !defined( R8B_FLTFRACS )
  31. /**
  32. * This macro defines the default number of fractional delay filters that
  33. * are sampled by the filter bank. Macro is used by the r8b::CDSPResampler
  34. * class. In order to get consistent results when resampling to/from
  35. * different sample rates, it is suggested to set this macro to a suitable
  36. * prime number.
  37. */
  38. #define R8B_FLTFRACS 1733
  39. #endif // !defined( R8B_FLTFRACS )
  40. #if !defined( R8B_IPP )
  41. /**
  42. * Set the R8B_IPP macro definition to 1 to enable the use of Intel IPP's
  43. * fast Fourier transform functions. Also uncomment and correct the IPP
  44. * header inclusion macros.
  45. *
  46. * Do not forget to call the ippInit() function at the start of the
  47. * application, before using this library's functions.
  48. */
  49. #define R8B_IPP 0
  50. // #include <ippcore.h>
  51. // #include <ipps.h>
  52. #endif // !defined( R8B_IPP )
  53. #if !defined( R8BASSERT )
  54. /**
  55. * Assertion macro used to check for certain run-time conditions. By
  56. * default no action is taken if assertion fails.
  57. *
  58. * @param e Expression to check.
  59. */
  60. #define R8BASSERT( e )
  61. #endif // !defined( R8BASSERT )
  62. #if !defined( R8BCONSOLE )
  63. /**
  64. * Console output macro, used to output various resampler status strings,
  65. * including filter design parameters, convolver parameters.
  66. *
  67. * @param e Expression to send to the console, usually consists of a
  68. * standard "printf" format string followed by several parameters
  69. * (__VA_ARGS__).
  70. */
  71. #define R8BCONSOLE( ... )
  72. #endif // !defined( R8BCONSOLE )
  73. #if !defined( R8B_BASECLASS )
  74. /**
  75. * Macro defines the name of the class from which all classes that are
  76. * designed to be created on heap are derived. The default
  77. * r8b::CStdClassAllocator class uses "stdlib" memory allocation
  78. * functions.
  79. *
  80. * The classes that are best placed on stack or as class members are not
  81. * derived from any class.
  82. */
  83. #define R8B_BASECLASS :: r8b :: CStdClassAllocator
  84. #endif // !defined( R8B_BASECLASS )
  85. #if !defined( R8B_MEMALLOCCLASS )
  86. /**
  87. * Macro defines the name of the class that implements raw memory
  88. * allocation functions, see the r8b::CStdMemAllocator class for details.
  89. */
  90. #define R8B_MEMALLOCCLASS :: r8b :: CStdMemAllocator
  91. #endif // !defined( R8B_MEMALLOCCLASS )
  92. #if !defined( R8B_FILTER_CACHE_MAX )
  93. /**
  94. * This macro specifies the number of filters kept in the cache at most.
  95. * The actual number can be higher if many different filters are in use at
  96. * the same time.
  97. */
  98. #define R8B_FILTER_CACHE_MAX 96
  99. #endif // !defined( R8B_FILTER_CACHE_MAX )
  100. #if !defined( R8B_FLTTEST )
  101. /**
  102. * This macro, when equal to 1, enables fractional delay filter bank
  103. * testing: in this mode the filter bank becomes dynamic member of the
  104. * CDSPFracInterpolator object instead of being a global static object.
  105. */
  106. #define R8B_FLTTEST 0
  107. #endif // !defined( R8B_FLTTEST )
  108. #endif // R8BCONF_INCLUDED