Audio plugin host https://kx.studio/carla
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.

180 lines
5.2KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "CarlaDefines.h"
  18. #ifdef CARLA_OS_WIN
  19. # include <cmath>
  20. # define errx(...) {}
  21. # define warnx(...) {}
  22. # define rindex strrchr
  23. using std::isnan;
  24. #else
  25. # include <err.h>
  26. #endif
  27. #define PLUGINVERSION
  28. #define SOURCE_DIR "/usr/share/zynaddsubfx/examples"
  29. #undef override
  30. // base c-style headers
  31. #include "zynaddsubfx/tlsf/tlsf.h"
  32. #include "zynaddsubfx/rtosc/rtosc.h"
  33. // C-code includes
  34. extern "C" {
  35. #include "zynaddsubfx/tlsf/tlsf.c"
  36. #undef TLSF_64BIT
  37. #undef tlsf_decl
  38. #undef tlsf_fls_sizet
  39. #undef tlsf_cast
  40. #undef tlsf_min
  41. #undef tlsf_max
  42. #undef tlsf_assert
  43. #undef _tlsf_glue2
  44. #undef _tlsf_glue
  45. #undef tlsf_static_assert
  46. #undef tlsf_insist
  47. #include "zynaddsubfx/rtosc/dispatch.c"
  48. #include "zynaddsubfx/rtosc/rtosc.c"
  49. }
  50. // rtosc includes
  51. #include "zynaddsubfx/rtosc/cpp/midimapper.cpp"
  52. #include "zynaddsubfx/rtosc/cpp/miditable.cpp"
  53. #undef RTOSC_INVALID_MIDI
  54. #undef MAX_UNHANDLED_PATH
  55. #include "zynaddsubfx/rtosc/cpp/ports.cpp"
  56. #undef __builtin_expect
  57. #include "zynaddsubfx/rtosc/cpp/subtree-serialize.cpp"
  58. #include "zynaddsubfx/rtosc/cpp/thread-link.cpp"
  59. #undef off_t
  60. #undef static
  61. #include "zynaddsubfx/rtosc/cpp/undo-history.cpp"
  62. // zynaddsubfx includes
  63. #include "zynaddsubfx/DSP/AnalogFilter.cpp"
  64. #include "zynaddsubfx/DSP/FFTwrapper.cpp"
  65. #include "zynaddsubfx/DSP/Filter.cpp"
  66. #include "zynaddsubfx/DSP/FormantFilter.cpp"
  67. #include "zynaddsubfx/DSP/SVFilter.cpp"
  68. #include "zynaddsubfx/DSP/Unison.cpp"
  69. #include "zynaddsubfx/Effects/Alienwah.cpp"
  70. #include "zynaddsubfx/Effects/Chorus.cpp"
  71. #include "zynaddsubfx/Effects/Distorsion.cpp"
  72. #include "zynaddsubfx/Effects/DynamicFilter.cpp"
  73. #include "zynaddsubfx/Effects/Echo.cpp"
  74. #undef MAX_DELAY
  75. #include "zynaddsubfx/Effects/Effect.cpp"
  76. #include "zynaddsubfx/Effects/EffectLFO.cpp"
  77. #include "zynaddsubfx/Effects/EffectMgr.cpp"
  78. #undef rObject
  79. #include "zynaddsubfx/Effects/EQ.cpp"
  80. #include "zynaddsubfx/Effects/Phaser.cpp"
  81. #undef PHASER_LFO_SHAPE
  82. #undef ONE_
  83. #undef ZERO_
  84. #include "zynaddsubfx/Effects/Reverb.cpp"
  85. #include "zynaddsubfx/Misc/Allocator.cpp"
  86. #include "zynaddsubfx/Misc/Bank.cpp"
  87. #undef INSTRUMENT_EXTENSION
  88. #undef FORCE_BANK_DIR_FILE
  89. #include "zynaddsubfx/Misc/Config.cpp"
  90. #undef rStdString
  91. #undef rStdStringCb
  92. #undef rObject
  93. #include "zynaddsubfx/Misc/Master.cpp"
  94. #undef rObject
  95. #include "zynaddsubfx/Misc/Microtonal.cpp"
  96. #undef MAX_LINE_SIZE
  97. #undef rObject
  98. #include "zynaddsubfx/Misc/MiddleWare.cpp"
  99. #include "zynaddsubfx/Misc/Part.cpp"
  100. #undef rChangeCb
  101. #define rChangeCb
  102. #undef rObject
  103. #undef CLONE
  104. #include "zynaddsubfx/Misc/PresetExtractor.cpp"
  105. #include "zynaddsubfx/Misc/Recorder.cpp"
  106. //#include "zynaddsubfx/Misc/Stereo.cpp"
  107. #include "zynaddsubfx/Misc/TmpFileMgr.cpp"
  108. #include "zynaddsubfx/Misc/Util.cpp"
  109. #include "zynaddsubfx/Misc/WavFile.cpp"
  110. #include "zynaddsubfx/Misc/WaveShapeSmps.cpp"
  111. #include "zynaddsubfx/Misc/XMLwrapper.cpp"
  112. #include "zynaddsubfx/Params/ADnoteParameters.cpp"
  113. #undef EXPAND
  114. #undef rObject
  115. #include "zynaddsubfx/Params/Controller.cpp"
  116. #undef rObject
  117. #include "zynaddsubfx/Params/EnvelopeParams.cpp"
  118. #undef rObject
  119. #include "zynaddsubfx/Params/FilterParams.cpp"
  120. #undef rObject
  121. #include "zynaddsubfx/Params/LFOParams.cpp"
  122. #undef rObject
  123. #include "zynaddsubfx/Params/PADnoteParameters.cpp"
  124. #undef rObject
  125. #undef PC
  126. #undef P_C
  127. #include "zynaddsubfx/Params/Presets.cpp"
  128. #include "zynaddsubfx/Params/PresetsArray.cpp"
  129. #include "zynaddsubfx/Params/PresetsStore.cpp"
  130. #include "zynaddsubfx/Params/SUBnoteParameters.cpp"
  131. #undef rObject
  132. #undef doPaste
  133. #undef doPPaste
  134. #include "zynaddsubfx/Synth/ADnote.cpp"
  135. #include "zynaddsubfx/Synth/Envelope.cpp"
  136. #include "zynaddsubfx/Synth/LFO.cpp"
  137. #include "zynaddsubfx/Synth/OscilGen.cpp"
  138. #undef rObject
  139. #undef PC
  140. #undef DIFF
  141. #undef PRESERVE
  142. #undef RESTORE
  143. #undef FUNC
  144. #undef FILTER
  145. #include "zynaddsubfx/Synth/PADnote.cpp"
  146. #include "zynaddsubfx/Synth/Resonance.cpp"
  147. #undef rObject
  148. #include "zynaddsubfx/Synth/SUBnote.cpp"
  149. #include "zynaddsubfx/Synth/SynthNote.cpp"
  150. #include "zynaddsubfx/UI/ConnectionDummy.cpp"
  151. #include "zynaddsubfx/globals.cpp"
  152. // Dummy variables and functions for linking purposes
  153. // const char* instance_name = nullptr;
  154. // SYNTH_T* synth = nullptr;
  155. class WavFile;
  156. namespace Nio {
  157. void masterSwap(Master*){}
  158. // bool start(void){return 1;}
  159. // void stop(void){}
  160. bool setSource(std::string){return true;}
  161. bool setSink(std::string){return true;}
  162. std::set<std::string> getSources(void){return std::set<std::string>();}
  163. std::set<std::string> getSinks(void){return std::set<std::string>();}
  164. std::string getSource(void){return "";}
  165. std::string getSink(void){return "";}
  166. void waveNew(WavFile*){}
  167. void waveStart(){}
  168. void waveStop(){}
  169. // void waveEnd(void){}
  170. }