External plugins for 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.

distrho-kars.cpp 2.7KB

4 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2017 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. // config fix
  18. #include "distrho-kars/DistrhoPluginInfo.h"
  19. #if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL)
  20. # undef DISTRHO_PLUGIN_HAS_UI
  21. # define DISTRHO_PLUGIN_HAS_UI 0
  22. #endif
  23. #include "CarlaJuceUtils.hpp"
  24. // Plugin Code
  25. #include "distrho-kars/DistrhoArtworkKars.cpp"
  26. #include "distrho-kars/DistrhoPluginKars.cpp"
  27. #ifdef HAVE_DGL
  28. #include "distrho-kars/DistrhoUIKars.cpp"
  29. #endif
  30. // DISTRHO Code
  31. #define DISTRHO_PLUGIN_TARGET_CARLA
  32. #include "DistrhoPluginMain.cpp"
  33. #ifdef HAVE_DGL
  34. #include "DistrhoUIMain.cpp"
  35. #endif
  36. START_NAMESPACE_DISTRHO
  37. // -----------------------------------------------------------------------
  38. static const NativePluginDescriptor karsDesc = {
  39. /* category */ NATIVE_PLUGIN_CATEGORY_SYNTH,
  40. #ifdef HAVE_DGL
  41. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  42. |NATIVE_PLUGIN_IS_SYNTH
  43. |NATIVE_PLUGIN_HAS_UI
  44. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  45. |NATIVE_PLUGIN_USES_PARENT_ID),
  46. #else
  47. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  48. |NATIVE_PLUGIN_IS_SYNTH),
  49. #endif
  50. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  51. /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS,
  52. /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS,
  53. /* midiIns */ 1,
  54. /* midiOuts */ 0,
  55. /* paramIns */ DistrhoPluginKars::paramCount,
  56. /* paramOuts */ 0,
  57. /* name */ DISTRHO_PLUGIN_NAME,
  58. /* label */ "kars",
  59. /* maker */ "falkTX, Chris Cannam",
  60. /* copyright */ "ISC",
  61. PluginDescriptorFILL(PluginCarla)
  62. };
  63. END_NAMESPACE_DISTRHO
  64. // -----------------------------------------------------------------------
  65. CARLA_EXPORT
  66. void carla_register_native_plugin_distrho_kars();
  67. CARLA_EXPORT
  68. void carla_register_native_plugin_distrho_kars()
  69. {
  70. USE_NAMESPACE_DISTRHO
  71. carla_register_native_plugin(&karsDesc);
  72. }
  73. // -----------------------------------------------------------------------