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.

637 lines
18KB

  1. /*
  2. * Carla Backend API
  3. * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * 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 COPYING file
  16. */
  17. #ifndef __CARLA_BACKEND_HPP__
  18. #define __CARLA_BACKEND_HPP__
  19. #include "carla_defines.hpp"
  20. #include <cstdint>
  21. #include <cstdlib>
  22. #define CARLA_BACKEND_START_NAMESPACE namespace CarlaBackend {
  23. #define CARLA_BACKEND_END_NAMESPACE }
  24. #define CARLA_BACKEND_USE_NAMESPACE using namespace CarlaBackend;
  25. #define STR_MAX 0xFF
  26. CARLA_BACKEND_START_NAMESPACE
  27. /*!
  28. * @defgroup CarlaBackendAPI Carla Backend API
  29. *
  30. * The Carla Backend API
  31. *
  32. * @{
  33. */
  34. #ifdef BUILD_BRIDGE
  35. const unsigned short MAX_PLUGINS = 1;
  36. #else
  37. const unsigned short MAX_PLUGINS = 99; //!< Maximum number of loadable plugins
  38. #endif
  39. const unsigned int MAX_PARAMETERS = 200; //!< Default value for the maximum number of parameters allowed.\see OPTION_MAX_PARAMETERS
  40. /*!
  41. * @defgroup PluginHints Plugin Hints
  42. *
  43. * Various plugin hints.
  44. * \see CarlaPlugin::hints()
  45. * @{
  46. */
  47. #ifndef BUILD_BRIDGE
  48. const unsigned int PLUGIN_IS_BRIDGE = 0x001; //!< Plugin is a bridge (ie, BridgePlugin). This hint is required because "bridge" itself is not a plugin type.
  49. #endif
  50. const unsigned int PLUGIN_IS_SYNTH = 0x002; //!< Plugin is a synthesizer (produces sound).
  51. const unsigned int PLUGIN_HAS_GUI = 0x004; //!< Plugin has its own custom GUI.
  52. const unsigned int PLUGIN_USES_CHUNKS = 0x008; //!< Plugin uses chunks to save internal data.\see CarlaPlugin::chunkData()
  53. const unsigned int PLUGIN_USES_SINGLE_THREAD = 0x010; //!< Plugin needs a single thread for both DSP and UI events.
  54. const unsigned int PLUGIN_CAN_DRYWET = 0x020; //!< Plugin can make use of Dry/Wet controls.
  55. const unsigned int PLUGIN_CAN_VOLUME = 0x040; //!< Plugin can make use of Volume controls.
  56. const unsigned int PLUGIN_CAN_BALANCE = 0x080; //!< Plugin can make use of Left & Right Balance controls.
  57. const unsigned int PLUGIN_CAN_FORCE_STEREO = 0x100; //!< Plugin can be used in forced-stereo mode.
  58. /**@}*/
  59. /*!
  60. * @defgroup ParameterHints Parameter Hints
  61. *
  62. * Various parameter hints.
  63. * \see CarlaPlugin::parameterData()
  64. * @{
  65. */
  66. const unsigned int PARAMETER_IS_BOOLEAN = 0x01; //!< Parameter value is of boolean type (always at minimum or maximum).
  67. const unsigned int PARAMETER_IS_INTEGER = 0x02; //!< Parameter values are always integer.
  68. const unsigned int PARAMETER_IS_LOGARITHMIC = 0x04; //!< Parameter is logarithmic (informative only, not really implemented).
  69. const unsigned int PARAMETER_IS_ENABLED = 0x08; //!< Parameter is enabled and will be shown in the host built-in editor.
  70. const unsigned int PARAMETER_IS_AUTOMABLE = 0x10; //!< Parameter is automable (realtime safe)
  71. const unsigned int PARAMETER_USES_SAMPLERATE = 0x20; //!< Parameter needs sample rate to work (value and ranges are multiplied by SR, and divided by SR on save).
  72. const unsigned int PARAMETER_USES_SCALEPOINTS = 0x40; //!< Parameter uses scalepoints to define internal values in a meaninful way.
  73. const unsigned int PARAMETER_USES_CUSTOM_TEXT = 0x80; //!< Parameter uses custom text for displaying its value.\see CarlaPlugin::getParameterText()
  74. /**@}*/
  75. /*!
  76. * @defgroup CustomDataTypes Custom Data types
  77. *
  78. * The type defines how the \param value in CustomData is stored.
  79. *
  80. * Types are valid URIs.\n
  81. * Any non-string, non-simple type (not integral) is saved in a base64 encoded format.
  82. */
  83. const char* const CUSTOM_DATA_INVALID = nullptr; //!< Null/Invalid data.
  84. const char* const CUSTOM_DATA_CHUNK = "http://kxstudio.sf.net/ns/carla/chunk"; //!< Carla Chunk
  85. const char* const CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"; //!< Carla String
  86. /**@}*/
  87. /*!
  88. * @defgroup BridgeMessages Bridge Messages
  89. *
  90. * Various bridge related messages, used as configure(<message>, value).
  91. * \note This is for internal use only.
  92. *
  93. * TODO: Review these, may not be needed anymore
  94. * @{
  95. */
  96. //const char* const CARLA_BRIDGE_MSG_HIDE_GUI = "CarlaBridgeHideGUI"; //!< Plugin -> Host call, tells host GUI is now hidden
  97. //const char* const CARLA_BRIDGE_MSG_SAVED = "CarlaBridgeSaved"; //!< Plugin -> Host call, tells host state is saved
  98. //const char* const CARLA_BRIDGE_MSG_SAVE_NOW = "CarlaBridgeSaveNow"; //!< Host -> Plugin call, tells plugin to save state now
  99. //const char* const CARLA_BRIDGE_MSG_SET_CHUNK = "CarlaBridgeSetChunk"; //!< Host -> Plugin call, tells plugin to set chunk in file \a value
  100. //const char* const CARLA_BRIDGE_MSG_SET_CUSTOM = "CarlaBridgeSetCustom"; //!< Host -> Plugin call, tells plugin to set a custom data set using \a value ("type·key·rvalue").\n If \a type is 'chunk' or 'binary' \a rvalue refers to chunk file.
  101. /**@}*/
  102. /*!
  103. * The binary type of a plugin.
  104. */
  105. enum BinaryType {
  106. BINARY_NONE = 0, //!< Null binary type.
  107. BINARY_POSIX32 = 1, //!< POSIX 32bit.
  108. BINARY_POSIX64 = 2, //!< POSIX 64bit.
  109. BINARY_WIN32 = 3, //!< Windows 32bit.
  110. BINARY_WIN64 = 4, //!< Windows 64bit.
  111. BINARY_OTHER = 5 //!< Other.
  112. };
  113. /*!
  114. * All the available plugin types, as provided by subclasses of CarlaPlugin.\n
  115. * \note Some plugin classes might provide more than 1 plugin type.
  116. */
  117. enum PluginType {
  118. PLUGIN_NONE = 0, //!< Null plugin type.
  119. #ifndef BUILD_BRIDGE
  120. PLUGIN_INTERNAL = 1, //!< Internal plugin.\see NativePlugin
  121. #endif
  122. PLUGIN_LADSPA = 2, //!< LADSPA plugin.\see LadspaPlugin
  123. PLUGIN_DSSI = 3, //!< DSSI plugin.\see DssiPlugin
  124. PLUGIN_LV2 = 4, //!< LV2 plugin.\see Lv2Plugin
  125. PLUGIN_VST = 5, //!< VST plugin.\see VstPlugin
  126. #ifndef BUILD_BRIDGE
  127. PLUGIN_GIG = 6, //!< GIG sound kit, implemented via LinuxSampler.\see LinuxSamplerPlugin
  128. PLUGIN_SF2 = 7, //!< SF2 sound kit (aka SoundFont), implemented via FluidSynth.\see FluidSynthPlugin
  129. PLUGIN_SFZ = 8 //!< SFZ sound kit, implemented via LinuxSampler.\see LinuxSamplerPlugin
  130. #endif
  131. };
  132. /*!
  133. * Plugin category, describing the funtionality of a plugin.\n
  134. * When a plugin fails to tell his own category, one is atributted to it based on its name.
  135. */
  136. enum PluginCategory {
  137. PLUGIN_CATEGORY_NONE = 0, //!< Null plugin category.
  138. PLUGIN_CATEGORY_SYNTH = 1, //!< A synthesizer or generator.
  139. PLUGIN_CATEGORY_DELAY = 2, //!< A delay or reverberator.
  140. PLUGIN_CATEGORY_EQ = 3, //!< An equalizer.
  141. PLUGIN_CATEGORY_FILTER = 4, //!< A filter.
  142. PLUGIN_CATEGORY_DYNAMICS = 5, //!< A 'dynamic' plugin (amplifier, compressor, gate, etc).
  143. PLUGIN_CATEGORY_MODULATOR = 6, //!< A 'modulator' plugin (chorus, flanger, phaser, etc).
  144. PLUGIN_CATEGORY_UTILITY = 7, //!< An 'utility' plugin (analyzer, converter, mixer, etc).
  145. PLUGIN_CATEGORY_OTHER = 8 //!< Misc plugin (used to check if the plugin has a category).
  146. };
  147. /*!
  148. * Plugin parameter type.
  149. */
  150. enum ParameterType {
  151. PARAMETER_UNKNOWN = 0, //!< Null parameter type.
  152. PARAMETER_INPUT = 1, //!< Input parameter.
  153. PARAMETER_OUTPUT = 2, //!< Ouput parameter.
  154. PARAMETER_LATENCY = 3, //!< Special latency parameter, used in LADSPA, DSSI and LV2 plugins.
  155. PARAMETER_SAMPLE_RATE = 4, //!< Special sample-rate parameter, used in LADSPA, DSSI and LV2 plugins.
  156. #ifdef WANT_LV2
  157. PARAMETER_LV2_FREEWHEEL = 5, //!< Special LV2 Plugin parameter used to report freewheel (offline) mode.
  158. PARAMETER_LV2_TIME = 6 //!< Special LV2 Plugin parameter used to report time information.
  159. #endif
  160. };
  161. /*!
  162. * Internal parameter indexes.\n
  163. * These are special parameters used internally, plugins do not know about their existence.
  164. */
  165. enum InternalParametersIndex {
  166. PARAMETER_NULL = -1, //!< Null parameter.
  167. PARAMETER_ACTIVE = -2, //!< Active parameter, can only be 'true' or 'false'; default is 'false'.
  168. PARAMETER_DRYWET = -3, //!< Dry/Wet parameter, range 0.0...1.0; default is 1.0.
  169. PARAMETER_VOLUME = -4, //!< Volume parameter, range 0.0...1.27; default is 1.0.
  170. PARAMETER_BALANCE_LEFT = -5, //!< Balance-Left parameter, range -1.0...1.0; default is -1.0.
  171. PARAMETER_BALANCE_RIGHT = -6 //!< Balance-Right parameter, range -1.0...1.0; default is 1.0.
  172. };
  173. /*!
  174. * Plugin custom GUI type.
  175. * \see OPTION_PREFER_UI_BRIDGES
  176. *
  177. * TODO: these need to be handled all internally, only via showGui() backend-side
  178. */
  179. //enum GuiType {
  180. // GUI_NONE = 0, //!< Null type, plugin has no custom GUI.
  181. // GUI_INTERNAL_QT4 = 1, //!< Qt4 type, handled internally.
  182. // GUI_INTERNAL_COCOA = 2, //!< Reparented MacOS native type, handled internally.
  183. // GUI_INTERNAL_HWND = 3, //!< Reparented Windows native type, handled internally.
  184. // GUI_INTERNAL_X11 = 4, //!< Reparented X11 native type, handled internally.
  185. // GUI_EXTERNAL_LV2 = 5, //!< External LV2-UI type, handled internally.
  186. // GUI_EXTERNAL_SUIL = 6, //!< SUIL type, currently used only for lv2 gtk2 direct-access UIs.\note This type will be removed in the future!
  187. // GUI_EXTERNAL_OSC = 7 //!< External, osc-bridge controlled, UI.
  188. //};
  189. /*!
  190. * Options used in the set_option() call.\n
  191. * These options must be set before calling engine_init() or after engine_close().
  192. */
  193. enum OptionsType {
  194. /*!
  195. * Try to set the current process name.\n
  196. * \note Not available on all platforms.
  197. */
  198. OPTION_PROCESS_NAME = 0,
  199. /*!
  200. * Set the engine processing mode.\n
  201. * Default is PROCESS_MODE_CONTINUOUS_RACK.
  202. * \see ProcessMode
  203. */
  204. OPTION_PROCESS_MODE = 1,
  205. /*!
  206. * High-Precision processing mode.\n
  207. * When enabled, audio will be processed by blocks of 8 samples at a time, indenpendently of the buffer size.\n
  208. * Default is off.\n
  209. * EXPERIMENTAL AND INCOMPLETE!
  210. */
  211. OPTION_PROCESS_HIGH_PRECISION = 2,
  212. /*!
  213. * Maximum number of parameters allowed.\n
  214. * Default is MAX_PARAMETERS.
  215. */
  216. OPTION_MAX_PARAMETERS = 3,
  217. /*!
  218. * Prefered buffer size.
  219. */
  220. OPTION_PREFERRED_BUFFER_SIZE = 4,
  221. /*!
  222. * Prefered sample rate.
  223. */
  224. OPTION_PREFERRED_SAMPLE_RATE = 5,
  225. /*!
  226. * Force mono plugins as stereo, by running 2 instances at the same time.\n
  227. * Not supported by all plugins.
  228. */
  229. OPTION_FORCE_STEREO = 6,
  230. #ifdef WANT_DSSI
  231. /*!
  232. * Use (unofficial) dssi-vst chunks feature.\n
  233. * Default is no.
  234. */
  235. OPTION_USE_DSSI_VST_CHUNKS = 7,
  236. #endif
  237. /*!
  238. * Use plugin bridges whenever possible.\n
  239. * Default is no, and not recommended at this point!.
  240. * EXPERIMENTAL AND INCOMPLETE!
  241. */
  242. OPTION_PREFER_PLUGIN_BRIDGES = 8,
  243. /*!
  244. * Use OSC-UI bridges whenever possible, otherwise UIs will be handled in the main thread.\n
  245. * Default is yes.
  246. */
  247. OPTION_PREFER_UI_BRIDGES = 9,
  248. /*!
  249. * Timeout value in ms for how much to wait for OSC-Bridges to respond.\n
  250. * Default is 4000 ms (4 secs).
  251. */
  252. OPTION_OSC_UI_TIMEOUT = 10,
  253. /*!
  254. * Set path to the native plugin bridge executable.\n
  255. * Default unset.
  256. */
  257. OPTION_PATH_BRIDGE_NATIVE = 11,
  258. /*!
  259. * Set path to the POSIX 32bit plugin bridge executable.\n
  260. * Default unset.
  261. */
  262. OPTION_PATH_BRIDGE_POSIX32 = 12,
  263. /*!
  264. * Set path to the POSIX 64bit plugin bridge executable.\n
  265. * Default unset.
  266. */
  267. OPTION_PATH_BRIDGE_POSIX64 = 13,
  268. /*!
  269. * Set path to the Windows 32bit plugin bridge executable.\n
  270. * Default unset.
  271. */
  272. OPTION_PATH_BRIDGE_WIN32 = 14,
  273. /*!
  274. * Set path to the Windows 64bit plugin bridge executable.\n
  275. * Default unset.
  276. */
  277. OPTION_PATH_BRIDGE_WIN64 = 15,
  278. #ifdef WANT_LV2
  279. /*!
  280. * Set path to the LV2 Gtk2 UI bridge executable.\n
  281. * Default unset.
  282. */
  283. OPTION_PATH_BRIDGE_LV2_GTK2 = 16,
  284. /*!
  285. * Set path to the LV2 Gtk3 UI bridge executable.\n
  286. * Default unset.
  287. */
  288. OPTION_PATH_BRIDGE_LV2_GTK3 = 17,
  289. /*!
  290. * Set path to the LV2 Qt4 UI bridge executable.\n
  291. * Default unset.
  292. */
  293. OPTION_PATH_BRIDGE_LV2_QT4 = 18,
  294. /*!
  295. * Set path to the LV2 Qt5 UI bridge executable.\n
  296. * Default unset.
  297. */
  298. OPTION_PATH_BRIDGE_LV2_QT5 = 19,
  299. /*!
  300. * Set path to the LV2 Cocoa UI bridge executable.\n
  301. * Default unset.
  302. */
  303. OPTION_PATH_BRIDGE_LV2_COCOA = 20,
  304. /*!
  305. * Set path to the LV2 Windows UI bridge executable.\n
  306. * Default unset.
  307. */
  308. OPTION_PATH_BRIDGE_LV2_WINDOWS = 21,
  309. /*!
  310. * Set path to the LV2 X11 UI bridge executable.\n
  311. * Default unset.
  312. */
  313. OPTION_PATH_BRIDGE_LV2_X11 = 22,
  314. #endif
  315. #ifdef WANT_VST
  316. /*!
  317. * Set path to the VST Cocoa UI bridge executable.\n
  318. * Default unset.
  319. */
  320. OPTION_PATH_BRIDGE_VST_COCOA = 23,
  321. /*!
  322. * Set path to the VST HWND UI bridge executable.\n
  323. * Default unset.
  324. */
  325. OPTION_PATH_BRIDGE_VST_HWND = 24,
  326. /*!
  327. * Set path to the VST X11 UI bridge executable.\n
  328. * Default unset.
  329. */
  330. OPTION_PATH_BRIDGE_VST_X11 = 25
  331. #endif
  332. };
  333. /*!
  334. * Opcodes sent from the engine callback, as defined by CallbackFunc.
  335. *
  336. * \see set_callback_function()
  337. */
  338. enum CallbackType {
  339. /*!
  340. * Debug.\n
  341. * This opcode is undefined and used only for testing purposes.
  342. */
  343. CALLBACK_DEBUG = 0,
  344. /*!
  345. * A parameter has been changed.
  346. *
  347. * \param value1 Parameter index
  348. * \param value3 Value
  349. */
  350. CALLBACK_PARAMETER_VALUE_CHANGED = 1,
  351. /*!
  352. * A parameter's MIDI channel has been changed.
  353. *
  354. * \param value1 Parameter index
  355. * \param value2 MIDI channel
  356. */
  357. CALLBACK_PARAMETER_MIDI_CHANNEL_CHANGED = 2,
  358. /*!
  359. * A parameter's MIDI CC has been changed.
  360. *
  361. * \param value1 Parameter index
  362. * \param value2 MIDI CC
  363. */
  364. CALLBACK_PARAMETER_MIDI_CC_CHANGED = 3,
  365. /*!
  366. * The current program has has been changed.
  367. *
  368. * \param value1 Program index
  369. */
  370. CALLBACK_PROGRAM_CHANGED = 4,
  371. /*!
  372. * The current MIDI program has been changed.
  373. *
  374. * \param value1 MIDI bank
  375. * \param value2 MIDI program
  376. */
  377. CALLBACK_MIDI_PROGRAM_CHANGED = 5,
  378. /*!
  379. * A note has been pressed.
  380. *
  381. * \param value1 Channel
  382. * \param value2 Note
  383. * \param value3 Velocity
  384. */
  385. CALLBACK_NOTE_ON = 6,
  386. /*!
  387. * A note has been released.
  388. *
  389. * \param value1 Channel
  390. * \param value2 Note
  391. */
  392. CALLBACK_NOTE_OFF = 7,
  393. /*!
  394. * The plugin's custom GUI state has changed.
  395. *
  396. * \param value1 State, as follows:.\n
  397. * 0: GUI has been closed or hidden\n
  398. * 1: GUI has been shown\n
  399. * -1: GUI has crashed and should not be shown again\n
  400. */
  401. CALLBACK_SHOW_GUI = 8,
  402. /*!
  403. * The plugin's custom GUI has been resized.
  404. *
  405. * \param value1 Width
  406. * \param value2 Height
  407. */
  408. CALLBACK_RESIZE_GUI = 9,
  409. /*!
  410. * The plugin needs update.
  411. */
  412. CALLBACK_UPDATE = 10,
  413. /*!
  414. * The plugin's data/information has changed.
  415. */
  416. CALLBACK_RELOAD_INFO = 11,
  417. /*!
  418. * The plugin's parameters have changed.
  419. */
  420. CALLBACK_RELOAD_PARAMETERS = 12,
  421. /*!
  422. * The plugin's programs have changed.
  423. */
  424. CALLBACK_RELOAD_PROGRAMS = 13,
  425. /*!
  426. * The plugin's state has changed.
  427. */
  428. CALLBACK_RELOAD_ALL = 14,
  429. /*!
  430. * Non-Session-Manager Announce message.
  431. */
  432. CALLBACK_NSM_ANNOUNCE = 15,
  433. /*!
  434. * Non-Session-Manager Open message #1.
  435. */
  436. CALLBACK_NSM_OPEN1 = 16,
  437. /*!
  438. * Non-Session-Manager Open message #2.
  439. */
  440. CALLBACK_NSM_OPEN2 = 17,
  441. /*!
  442. * Non-Session-Manager Save message.
  443. */
  444. CALLBACK_NSM_SAVE = 18,
  445. /*!
  446. * An error occurred, show last error to user.
  447. */
  448. CALLBACK_ERROR = 19,
  449. /*!
  450. * The engine has crashed or malfunctioned and will no longer work.
  451. */
  452. CALLBACK_QUIT = 20
  453. };
  454. /*!
  455. * Engine process mode.
  456. *
  457. * \see OPTION_PROCESS_MODE
  458. */
  459. enum ProcessMode {
  460. PROCESS_MODE_SINGLE_CLIENT = 0, //!< Single client mode (dynamic input/outputs as needed by plugins)
  461. PROCESS_MODE_MULTIPLE_CLIENTS = 1, //!< Multiple client mode (1 master client + 1 client per plugin)
  462. PROCESS_MODE_CONTINUOUS_RACK = 2, //!< Single client, 'rack' mode. Processes plugins in order of id, with forced stereo.
  463. PROCESS_MODE_PATCHBAY = 3 //!< Single client, 'patchbay' mode.
  464. };
  465. /*!
  466. * Callback function the backend will call when something interesting happens.
  467. *
  468. * \see set_callback_function() and CallbackType
  469. */
  470. typedef void (*CallbackFunc)(void* ptr, CallbackType action, unsigned short pluginId, int value1, int value2, double value3, const char* valueStr);
  471. /*!
  472. * Parameter data
  473. */
  474. struct ParameterData {
  475. ParameterType type;
  476. int32_t index;
  477. int32_t rindex;
  478. int32_t hints;
  479. uint8_t midiChannel;
  480. int16_t midiCC;
  481. ParameterData()
  482. : type(PARAMETER_UNKNOWN),
  483. index(-1),
  484. rindex(-1),
  485. hints(0),
  486. midiChannel(0),
  487. midiCC(-1) {}
  488. };
  489. /*!
  490. * Parameter ranges
  491. */
  492. struct ParameterRanges {
  493. float def;
  494. float min;
  495. float max;
  496. float step;
  497. float stepSmall;
  498. float stepLarge;
  499. ParameterRanges()
  500. : def(0.0f),
  501. min(0.0f),
  502. max(1.0f),
  503. step(0.01f),
  504. stepSmall(0.0001f),
  505. stepLarge(0.1f) {}
  506. };
  507. /*!
  508. * MIDI Program data
  509. */
  510. struct MidiProgramData {
  511. uint32_t bank;
  512. uint32_t program;
  513. const char* name;
  514. MidiProgramData()
  515. : bank(0),
  516. program(0),
  517. name(nullptr) {}
  518. ~MidiProgramData()
  519. {
  520. if (name)
  521. free((void*)name);
  522. }
  523. };
  524. /*!
  525. * Custom data, saving key:value 'dictionaries'.
  526. * \a type is an URI.
  527. *
  528. * \see CustomDataTypes
  529. */
  530. struct CustomData {
  531. const char* type;
  532. const char* key;
  533. const char* value;
  534. CustomData()
  535. : type(nullptr),
  536. key(nullptr),
  537. value(nullptr) {}
  538. ~CustomData()
  539. {
  540. if (type)
  541. free((void*)type);
  542. if (key)
  543. free((void*)key);
  544. if (value)
  545. free((void*)value);
  546. }
  547. };
  548. /**@}*/
  549. // forward declarations of commonly used Carla classes
  550. class CarlaEngine;
  551. class CarlaPlugin;
  552. CARLA_BACKEND_END_NAMESPACE
  553. #endif // __CARLA_BACKEND_HPP__