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.

208 lines
5.3KB

  1. /*
  2. * Carla Plugin Host
  3. * Copyright (C) 2011-2018 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 "CarlaUtils.h"
  18. #include "CarlaString.hpp"
  19. #include "rtaudio/RtAudio.h"
  20. #include "rtmidi/RtMidi.h"
  21. #ifdef HAVE_FLUIDSYNTH
  22. # include <fluidsynth.h>
  23. #endif
  24. #ifdef USING_JUCE
  25. # include "AppConfig.h"
  26. # include "juce_core/juce_core.h"
  27. #endif
  28. #include "water/files/File.h"
  29. // -------------------------------------------------------------------------------------------------------------------
  30. const char* carla_get_complete_license_text()
  31. {
  32. carla_debug("carla_get_complete_license_text()");
  33. static CarlaString retText;
  34. if (retText.isEmpty())
  35. {
  36. retText =
  37. "<p>This current Carla build is using the following features and 3rd-party code:</p>"
  38. "<ul>"
  39. // Plugin formats
  40. "<li>LADSPA plugin support</li>"
  41. "<li>DSSI plugin support</li>"
  42. "<li>LV2 plugin support</li>"
  43. #if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
  44. "<li>VST2/2 plugin support (using Juce)</li>"
  45. #else
  46. "<li>VST2 plugin support (using VeSTige header by Javier Serrano Polo)</li>"
  47. #endif
  48. #if defined(USING_JUCE) && defined(CARLA_OS_MAC)
  49. "<li>AU plugin support (using Juce)</li>"
  50. #endif
  51. // Sample kit libraries
  52. #ifdef HAVE_FLUIDSYNTH
  53. "<li>FluidSynth library v" FLUIDSYNTH_VERSION " for SF2/3 support</li>"
  54. #endif
  55. "<li>SFZero module for SFZ support</li>"
  56. // misc libs
  57. "<li>base64 utilities based on code by Ren\u00E9 Nyffenegger</li>"
  58. "<li>liblo library for OSC support</li>"
  59. "<li>rtmempool library by Nedko Arnaudov"
  60. "<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>"
  61. #ifndef USING_JUCE
  62. "<li>RtAudio v" RTAUDIO_VERSION " and RtMidi v" RTMIDI_VERSION " for native Audio and MIDI support</li>"
  63. #endif
  64. // Internal plugins
  65. "<li>MIDI Sequencer UI code by Perry Nguyen</li>"
  66. // External plugins
  67. #ifdef HAVE_EXTERNAL_PLUGINS
  68. "<li>Nekobi plugin code based on nekobee by Sean Bolton and others</li>"
  69. "<li>VectorJuice and WobbleJuice plugin code by Andre Sklenar</li>"
  70. # ifdef HAVE_ZYN_DEPS
  71. "<li>ZynAddSubFX plugin code by Mark McCurry and Nasca Octavian Paul</li>"
  72. # endif
  73. #endif // HAVE_EXTERNAL_PLUGINS
  74. // end
  75. "</ul>";
  76. }
  77. return retText;
  78. }
  79. const char* carla_get_juce_version()
  80. {
  81. carla_debug("carla_get_juce_version()");
  82. static CarlaString retVersion;
  83. #ifdef USING_JUCE
  84. if (retVersion.isEmpty())
  85. {
  86. if (const char* const version = juce::SystemStats::getJUCEVersion().toRawUTF8())
  87. retVersion = version+6;
  88. else
  89. retVersion = "Unknown";
  90. }
  91. #endif
  92. return retVersion;
  93. }
  94. const char* const* carla_get_supported_file_extensions()
  95. {
  96. carla_debug("carla_get_supported_file_extensions()");
  97. // NOTE: please keep in sync with CarlaEngine::loadFile!!
  98. static const char* const extensions[] = {
  99. // Base types
  100. "carxp", "carxs",
  101. // plugin files and resources
  102. #ifdef HAVE_FLUIDSYNTH
  103. "sf2", "sf3",
  104. #endif
  105. #ifdef HAVE_ZYN_DEPS
  106. "xmz", "xiz",
  107. #endif
  108. #ifdef CARLA_OS_MAC
  109. "vst",
  110. #else
  111. "dll",
  112. "so",
  113. #endif
  114. #if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
  115. "vst3",
  116. #endif
  117. // Audio files
  118. #ifdef HAVE_SNDFILE
  119. "aif", "aifc", "aiff", "au", "bwf", "flac", "htk", "iff", "mat4", "mat5", "oga", "ogg",
  120. "paf", "pvf", "pvf5", "sd2", "sf", "snd", "svx", "vcc", "w64", "wav", "xi",
  121. #endif
  122. #ifdef HAVE_FFMPEG
  123. "3g2", "3gp", "aac", "ac3", "amr", "ape", "mp2", "mp3", "mpc", "wma",
  124. # ifndef HAVE_SNDFILE
  125. // FFmpeg without sndfile
  126. "flac", "oga", "ogg", "w64", "wav",
  127. # endif
  128. #endif
  129. // MIDI files
  130. "mid", "midi",
  131. // SFZ
  132. "sfz",
  133. // terminator
  134. nullptr
  135. };
  136. return extensions;
  137. }
  138. const char* const* carla_get_supported_features()
  139. {
  140. carla_debug("carla_get_supported_features()");
  141. static const char* const features[] = {
  142. #ifdef HAVE_FLUIDSYNTH
  143. "sf2",
  144. #endif
  145. #ifdef HAVE_HYLIA
  146. "link",
  147. #endif
  148. #ifdef HAVE_LIBLO
  149. "osc",
  150. #endif
  151. #if defined(HAVE_LIBMAGIC) || defined(CARLA_OS_WIN)
  152. "bridges",
  153. #endif
  154. #ifdef HAVE_PYQT
  155. "gui",
  156. #endif
  157. #ifdef USING_JUCE
  158. "juce",
  159. # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
  160. "vst3",
  161. # endif
  162. # if defined(CARLA_OS_MAC)
  163. "au",
  164. # endif
  165. #endif
  166. nullptr
  167. };
  168. return features;
  169. }
  170. // -------------------------------------------------------------------------------------------------------------------
  171. #include "../CarlaHostCommon.cpp"
  172. // -------------------------------------------------------------------------------------------------------------------