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.

zynaddsubfx-src.cpp 5.2KB

10 years ago
9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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/Containers/MultiPseudoStack.cpp"
  64. #include "zynaddsubfx/Containers/NotePool.cpp"
  65. #include "zynaddsubfx/DSP/AnalogFilter.cpp"
  66. #include "zynaddsubfx/DSP/FFTwrapper.cpp"
  67. #include "zynaddsubfx/DSP/Filter.cpp"
  68. #include "zynaddsubfx/DSP/FormantFilter.cpp"
  69. #include "zynaddsubfx/DSP/SVFilter.cpp"
  70. #include "zynaddsubfx/DSP/Unison.cpp"
  71. #include "zynaddsubfx/Effects/Alienwah.cpp"
  72. #include "zynaddsubfx/Effects/Chorus.cpp"
  73. #include "zynaddsubfx/Effects/Distorsion.cpp"
  74. #include "zynaddsubfx/Effects/DynamicFilter.cpp"
  75. #include "zynaddsubfx/Effects/Echo.cpp"
  76. #undef MAX_DELAY
  77. #include "zynaddsubfx/Effects/Effect.cpp"
  78. #include "zynaddsubfx/Effects/EffectLFO.cpp"
  79. #include "zynaddsubfx/Effects/EffectMgr.cpp"
  80. #undef rObject
  81. #include "zynaddsubfx/Effects/EQ.cpp"
  82. #include "zynaddsubfx/Effects/Phaser.cpp"
  83. #undef PHASER_LFO_SHAPE
  84. #undef ONE_
  85. #undef ZERO_
  86. #include "zynaddsubfx/Effects/Reverb.cpp"
  87. #include "zynaddsubfx/Misc/Allocator.cpp"
  88. #include "zynaddsubfx/Misc/Bank.cpp"
  89. #undef INSTRUMENT_EXTENSION
  90. #undef FORCE_BANK_DIR_FILE
  91. #include "zynaddsubfx/Misc/Config.cpp"
  92. #undef rStdString
  93. #undef rStdStringCb
  94. #undef rObject
  95. #include "zynaddsubfx/Misc/Master.cpp"
  96. #undef rObject
  97. #include "zynaddsubfx/Misc/Microtonal.cpp"
  98. #undef MAX_LINE_SIZE
  99. #undef rObject
  100. #include "zynaddsubfx/Misc/MiddleWare.cpp"
  101. #undef rObject
  102. #include "zynaddsubfx/Misc/Part.cpp"
  103. #undef rChangeCb
  104. #define rChangeCb
  105. #undef rObject
  106. #undef CLONE
  107. #include "zynaddsubfx/Misc/PresetExtractor.cpp"
  108. #include "zynaddsubfx/Misc/Recorder.cpp"
  109. //#include "zynaddsubfx/Misc/Stereo.cpp"
  110. #include "zynaddsubfx/Misc/Util.cpp"
  111. #include "zynaddsubfx/Misc/WavFile.cpp"
  112. #include "zynaddsubfx/Misc/WaveShapeSmps.cpp"
  113. #include "zynaddsubfx/Misc/XMLwrapper.cpp"
  114. #include "zynaddsubfx/Params/ADnoteParameters.cpp"
  115. #undef EXPAND
  116. #undef rObject
  117. #include "zynaddsubfx/Params/Controller.cpp"
  118. #undef rObject
  119. #include "zynaddsubfx/Params/EnvelopeParams.cpp"
  120. #undef rObject
  121. #include "zynaddsubfx/Params/FilterParams.cpp"
  122. #undef rObject
  123. #include "zynaddsubfx/Params/LFOParams.cpp"
  124. #undef rObject
  125. #include "zynaddsubfx/Params/PADnoteParameters.cpp"
  126. #undef rObject
  127. #undef PC
  128. #undef P_C
  129. #include "zynaddsubfx/Params/Presets.cpp"
  130. #include "zynaddsubfx/Params/PresetsArray.cpp"
  131. #include "zynaddsubfx/Params/PresetsStore.cpp"
  132. #include "zynaddsubfx/Params/SUBnoteParameters.cpp"
  133. #undef rObject
  134. #undef doPaste
  135. #undef doPPaste
  136. #include "zynaddsubfx/Synth/ADnote.cpp"
  137. #include "zynaddsubfx/Synth/Envelope.cpp"
  138. #include "zynaddsubfx/Synth/LFO.cpp"
  139. #include "zynaddsubfx/Synth/OscilGen.cpp"
  140. #undef rObject
  141. #undef PC
  142. #undef DIFF
  143. #undef PRESERVE
  144. #undef RESTORE
  145. #undef FUNC
  146. #undef FILTER
  147. #include "zynaddsubfx/Synth/PADnote.cpp"
  148. #include "zynaddsubfx/Synth/Resonance.cpp"
  149. #undef rObject
  150. #include "zynaddsubfx/Synth/SUBnote.cpp"
  151. #include "zynaddsubfx/Synth/SynthNote.cpp"
  152. #include "zynaddsubfx/UI/ConnectionDummy.cpp"
  153. #include "zynaddsubfx/globals.cpp"
  154. // Dummy variables and functions for linking purposes
  155. // const char* instance_name = nullptr;
  156. // SYNTH_T* synth = nullptr;
  157. class WavFile;
  158. namespace Nio {
  159. void masterSwap(Master*){}
  160. // bool start(void){return 1;}
  161. // void stop(void){}
  162. bool setSource(std::string){return true;}
  163. bool setSink(std::string){return true;}
  164. std::set<std::string> getSources(void){return std::set<std::string>();}
  165. std::set<std::string> getSinks(void){return std::set<std::string>();}
  166. std::string getSource(void){return "";}
  167. std::string getSink(void){return "";}
  168. void waveNew(WavFile*){}
  169. void waveStart(){}
  170. void waveStop(){}
  171. // void waveEnd(void){}
  172. }