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.

187 lines
4.8KB

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