LMMS
Loading...
Searching...
No Matches
Information.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <falktx@falktx.com>
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "CarlaUtils.h"
5#include "CarlaString.hpp"
6
7#if defined(HAVE_FLUIDSYNTH) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH)
8# include <fluidsynth.h>
9#endif
10
11#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
12# pragma GCC diagnostic push
13# pragma GCC diagnostic ignored "-Wconversion"
14# pragma GCC diagnostic ignored "-Weffc++"
15# pragma GCC diagnostic ignored "-Wsign-conversion"
16# pragma GCC diagnostic ignored "-Wundef"
17# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
18#endif
19
20#ifdef USING_RTAUDIO
21# include "rtaudio/RtAudio.h"
22# include "rtmidi/RtMidi.h"
23#endif
24
25#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
26# pragma GCC diagnostic pop
27#endif
28
29#include "water/files/File.h"
30
31// -------------------------------------------------------------------------------------------------------------------
32
34{
35 carla_debug("carla_get_complete_license_text()");
36
37 static CarlaString retText;
38
39 if (retText.isEmpty())
40 {
41 retText =
42 "<p>This current Carla build is using the following features and 3rd-party code:</p>"
43 "<ul>"
44
45 // Plugin formats
46 "<li>LADSPA plugin support</li>"
47 "<li>DSSI plugin support</li>"
48 "<li>LV2 plugin support</li>"
49 #if defined(USING_JUCE) && JUCE_PLUGINHOST_VST
50 "<li>VST2 plugin support (using JUCE)</li>"
51 #else
52 "<li>VST2 plugin support (using VeSTige header by Javier Serrano Polo)</li>"
53 #endif
54 #if defined(USING_JUCE) && JUCE_PLUGINHOST_VST3
55 "<li>VST3 plugin support (using JUCE)</li>"
56 #else
57 "<li>VST3 plugin support (using Travesty header files)</li>"
58 #endif
59 #if defined(USING_JUCE) && JUCE_PLUGINHOST_AU
60 "<li>AU plugin support (using JUCE)</li>"
61 #endif
62 #ifdef HAVE_YSFX
63 "<li>JSFX plugin support (using ysfx)</li>"
64 #endif
65
66 // Sample kit libraries
67 #if defined(HAVE_FLUIDSYNTH) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH)
68 "<li>FluidSynth library v" FLUIDSYNTH_VERSION " for SF2/3 support</li>"
69 #endif
70 "<li>SFZero module for SFZ support</li>"
71
72 // misc libs
73 "<li>base64 utilities based on code by Ren\u00E9 Nyffenegger</li>"
74 "<li>dr_mp3 for mp3 file support</li>"
75 #ifdef HAVE_LIBLO
76 "<li>liblo library for OSC support</li>"
77 #endif
78 #ifdef HAVE_SNDFILE
79 "<li>libsndfile library for base audio file support</li>"
80 #endif
81 "<li>rtmempool library by Nedko Arnaudov</li>"
82 "<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>"
83 #ifdef USING_RTAUDIO
84 "<li>RtAudio v" RTAUDIO_VERSION " and RtMidi v" RTMIDI_VERSION " for native Audio and MIDI support</li>"
85 #endif
86 "<li>zita-resampler for audio file sample rate resampling</li>"
87
88 // Internal plugins
89 "<li>MIDI Sequencer UI code by Perry Nguyen</li>"
90
91 // External plugins
92 #ifdef HAVE_EXTERNAL_PLUGINS
93 "<li>Nekobi plugin code based on nekobee by Sean Bolton and others</li>"
94 "<li>VectorJuice and WobbleJuice plugin code by Andre Sklenar</li>"
95 #ifdef HAVE_ZYN_DEPS
96 "<li>ZynAddSubFX plugin code by Mark McCurry and Nasca Octavian Paul</li>"
97 #endif
98 #endif
99
100 // end
101 "</ul>";
102 }
103
104 return retText;
105}
106
108{
109 carla_debug("carla_get_juce_version()");
110
111 #ifdef USING_JUCE
112 return "JUCE v7.0.1";
113 #else
114 return "Unknown";
115 #endif
116}
117
119{
120 carla_debug("carla_get_supported_file_extensions()");
121
122 // NOTE: please keep in sync with CarlaEngine::loadFile!!
123 static const char* const extensions[] = {
124 // Base types
125 "carxp", "carxs",
126
127 // plugin files and resources
128 #ifdef HAVE_FLUIDSYNTH
129 "sf2", "sf3",
130 #endif
131 #ifdef HAVE_FLUIDSYNTH_INSTPATCH
132 "dls", "gig",
133 #endif
134 #ifdef HAVE_ZYN_DEPS
135 "xmz", "xiz",
136 #endif
137 #ifdef CARLA_OS_MAC
138 "vst",
139 #else
140 "dll",
141 "so",
142 #endif
143 "vst3",
144 "clap",
145
146 // Audio files
147 #ifdef HAVE_SNDFILE
148 "aif", "aifc", "aiff", "au", "bwf", "flac", "htk", "iff", "mat4", "mat5", "oga", "ogg", "opus",
149 "paf", "pvf", "pvf5", "sd2", "sf", "snd", "svx", "vcc", "w64", "wav", "xi",
150 #endif
151 #ifdef HAVE_FFMPEG
152 "3g2", "3gp", "aac", "ac3", "amr", "ape", "mp2", "mp3", "mpc", "wma",
153 #ifndef HAVE_SNDFILE
154 // FFmpeg without sndfile
155 "flac", "oga", "ogg", "w64", "wav",
156 #endif
157 #else
158 // dr_mp3
159 "mp3",
160 #endif
161
162 // MIDI files
163 "mid", "midi",
164
165 // SFZ
166 "sfz",
167
168 #ifdef HAVE_YSFX
169 // JSFX
170 "jsfx",
171 #endif
172
173 // terminator
174 nullptr
175 };
176
177 return extensions;
178}
179
181{
182 carla_debug("carla_get_supported_features()");
183
184 static const char* const features[] = {
185 #ifdef HAVE_FLUIDSYNTH
186 "sf2",
187 #endif
188 #ifdef HAVE_FLUIDSYNTH_INSTPATCH
189 "dls", "gig",
190 #endif
191 #ifdef HAVE_HYLIA
192 "link",
193 #endif
194 #ifdef HAVE_LIBLO
195 "osc",
196 #endif
197 #if defined(HAVE_LIBMAGIC) || defined(CARLA_OS_WIN)
198 "bridges",
199 #endif
200 #ifdef HAVE_PYQT
201 "gui",
202 #endif
203 #ifdef HAVE_YSFX
204 "jsfx",
205 #endif
206 #ifdef USING_JUCE
207 "juce",
208 #if defined(CARLA_OS_MAC)
209 "au",
210 #endif
211 #endif
212 nullptr
213 };
214
215 return features;
216}
217
218// -------------------------------------------------------------------------------------------------------------------
219
221{
222 carla_debug("carla_get_library_filename()");
223
224 static CarlaString ret;
225
226 if (ret.isEmpty())
227 {
228 using water::File;
230 }
231
232 return ret;
233}
234
236{
237 carla_debug("carla_get_library_folder()");
238
239 static CarlaString ret;
240
241 if (ret.isEmpty())
242 {
243 using water::File;
245 }
246
247 return ret;
248}
249
250// -------------------------------------------------------------------------------------------------------------------
#define RTAUDIO_VERSION
Definition RtAudio.h:48
#define RTMIDI_VERSION
Definition RtMidi.h:47
Definition File.h:50
@ currentExecutableFile
Definition File.h:649
const String & getFullPathName() const noexcept
Definition File.h:152
static File getSpecialLocation(const SpecialLocationType type)
Definition File.cpp:1642
Definition File.h:50
const char * toRawUTF8() const
Definition String.cpp:1925
const char * carla_get_library_filename()
Definition Information.cpp:220
const char * carla_get_juce_version()
Definition Information.cpp:107
const char * carla_get_complete_license_text()
Definition Information.cpp:33
const char *const * carla_get_supported_file_extensions()
Definition Information.cpp:118
const char *const * carla_get_supported_features()
Definition Information.cpp:180
const char * carla_get_library_folder()
Definition Information.cpp:235