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.

201 lines
5.4KB

  1. /*
  2. * Carla Plugin Host
  3. * Copyright (C) 2011-2014 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 "CarlaHost.h"
  18. #include "CarlaString.hpp"
  19. #include "juce_audio_formats.h"
  20. // -------------------------------------------------------------------------------------------------------------------
  21. const char* carla_get_complete_license_text()
  22. {
  23. carla_debug("carla_get_complete_license_text()");
  24. static CarlaString retText;
  25. if (retText.isEmpty())
  26. {
  27. retText =
  28. "<p>This current Carla build is using the following features and 3rd-party code:</p>"
  29. "<ul>"
  30. // Plugin formats
  31. "<li>LADSPA plugin support</li>"
  32. "<li>DSSI plugin support</li>"
  33. "<li>LV2 plugin support</li>"
  34. #ifdef VESTIGE_HEADER
  35. "<li>VST plugin support using VeSTige header by Javier Serrano Polo</li>"
  36. #else
  37. "<li>VST plugin support using official VST SDK 2.4 [1]</li>"
  38. #endif
  39. #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
  40. "<li>VST3 plugin support using official VST SDK 3.6 [1]</li>"
  41. #endif
  42. #ifdef CARLA_OS_MAC
  43. "<li>AU plugin support</li>"
  44. #endif
  45. // Sample kit libraries
  46. #ifdef HAVE_FLUIDSYNTH
  47. "<li>FluidSynth library for SF2 support</li>"
  48. #endif
  49. #ifdef HAVE_LINUXSAMPLER
  50. "<li>LinuxSampler library for GIG and SFZ support [2]</li>"
  51. #endif
  52. // Internal plugins
  53. "<li>NekoFilter plugin code based on lv2fil by Nedko Arnaudov and Fons Adriaensen</li>"
  54. #ifdef WANT_ZYNADDSUBFX
  55. "<li>ZynAddSubFX plugin code</li>"
  56. #endif
  57. // misc libs
  58. "<li>base64 utilities based on code by Ren\u00E9 Nyffenegger</li>"
  59. #ifdef CARLA_OS_MAC
  60. "<li>sem_timedwait for Mac OS by Keith Shortridge</li>"
  61. #endif
  62. "<li>liblo library for OSC support</li>"
  63. "<li>rtmempool library by Nedko Arnaudov"
  64. "<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>"
  65. #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
  66. "<li>RtAudio and RtMidi libraries for extra Audio and MIDI support</li>"
  67. #endif
  68. // end
  69. "</ul>"
  70. "<p>"
  71. #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) || ! defined(VESTIGE_HEADER)
  72. // Required by VST SDK
  73. "&nbsp;[1] Trademark of Steinberg Media Technologies GmbH.<br/>"
  74. #endif
  75. #ifdef HAVE_LINUXSAMPLER
  76. // LinuxSampler GPL exception
  77. "&nbsp;[2] Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors."
  78. #endif
  79. "</p>"
  80. ;
  81. }
  82. return retText;
  83. }
  84. const char* carla_get_juce_version()
  85. {
  86. carla_debug("carla_get_juce_version()");
  87. static CarlaString retVersion;
  88. if (retVersion.isEmpty())
  89. {
  90. if (const char* const version = juce::SystemStats::getJUCEVersion().toRawUTF8())
  91. retVersion = version+6;
  92. else
  93. retVersion = "3.0";
  94. }
  95. return retVersion;
  96. }
  97. const char* carla_get_supported_file_extensions()
  98. {
  99. carla_debug("carla_get_supported_file_extensions()");
  100. static CarlaString retText;
  101. if (retText.isEmpty())
  102. {
  103. retText =
  104. // Base types
  105. "*.carxp;*.carxs"
  106. // MIDI files
  107. ";*.mid;*.midi"
  108. #ifdef HAVE_FLUIDSYNTH
  109. // fluidsynth (sf2)
  110. ";*.sf2"
  111. #endif
  112. #ifdef HAVE_LINUXSAMPLER
  113. // linuxsampler (gig and sfz)
  114. ";*.gig;*.sfz"
  115. #endif
  116. #ifdef WANT_ZYNADDSUBFX
  117. // zynaddsubfx presets
  118. ";*.xmz;*.xiz"
  119. #endif
  120. ;
  121. #ifndef BUILD_BRIDGE
  122. // Audio files
  123. {
  124. using namespace juce;
  125. AudioFormatManager afm;
  126. afm.registerBasicFormats();
  127. String juceFormats;
  128. for (AudioFormat **it=afm.begin(), **end=afm.end(); it != end; ++it)
  129. {
  130. const StringArray& exts((*it)->getFileExtensions());
  131. for (String *eit=exts.begin(), *eend=exts.end(); eit != eend; ++eit)
  132. juceFormats += String(";*" + (*eit)).toRawUTF8();
  133. }
  134. retText += juceFormats.toRawUTF8();
  135. }
  136. #endif
  137. }
  138. return retText;
  139. }
  140. // -------------------------------------------------------------------------------------------------------------------
  141. const char* carla_get_library_filename()
  142. {
  143. carla_debug("carla_get_library_filename()");
  144. static CarlaString ret;
  145. if (ret.isEmpty())
  146. {
  147. using juce::File;
  148. ret = File(File::getSpecialLocation(File::currentExecutableFile)).getFullPathName().toRawUTF8();
  149. }
  150. return ret;
  151. }
  152. const char* carla_get_library_folder()
  153. {
  154. carla_debug("carla_get_library_folder()");
  155. static CarlaString ret;
  156. if (ret.isEmpty())
  157. {
  158. using juce::File;
  159. ret = File(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory()).getFullPathName().toRawUTF8();
  160. }
  161. return ret;
  162. }
  163. // -------------------------------------------------------------------------------------------------------------------