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.

746 lines
20KB

  1. /*
  2. * Carla Standalone API
  3. * Copyright (C) 2011-2013 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 GPL.txt file
  16. */
  17. #ifndef __CARLA_STANDALONE_HPP__
  18. #define __CARLA_STANDALONE_HPP__
  19. #include "CarlaBackend.hpp"
  20. #include "CarlaJuceUtils.hpp"
  21. /*!
  22. * @defgroup CarlaStandaloneAPI Carla Standalone API
  23. *
  24. * The Carla Standalone API.
  25. *
  26. * This API makes it possible to use the Carla Backend in a Standalone application.\n
  27. * All functions are C-compatible, making it possible to use this API in non-C++ hosts.
  28. *
  29. * None of the returned values in this API calls need to be deleted or free'd.\n
  30. * When a function fails (returns false or NULL), use carla_get_last_error() to find out what went wrong.
  31. *
  32. * @{
  33. */
  34. /*!
  35. * @defgroup HelperTypedefs Helper typedefs
  36. *
  37. * Basic typedefs to help make code cleaner.
  38. * @{
  39. */
  40. typedef CarlaBackend::BinaryType CarlaBinaryType;
  41. typedef CarlaBackend::PluginType CarlaPluginType;
  42. typedef CarlaBackend::PluginCategory CarlaPluginCategory;
  43. typedef CarlaBackend::OptionsType CarlaOptionsType;
  44. typedef CarlaBackend::CallbackType CarlaCallbackType;
  45. typedef CarlaBackend::CallbackFunc CarlaCallbackFunc;
  46. typedef CarlaBackend::ParameterData CarlaParameterData;
  47. typedef CarlaBackend::ParameterRanges CarlaParameterRanges;
  48. typedef CarlaBackend::MidiProgramData CarlaMidiProgramData;
  49. typedef CarlaBackend::CustomData CarlaCustomData;
  50. /**@}*/
  51. /*!
  52. * Plugin information.
  53. * \see carla_get_plugin_info()
  54. */
  55. struct CarlaPluginInfo {
  56. CarlaPluginType type;
  57. CarlaPluginCategory category;
  58. unsigned int hints;
  59. unsigned int optionsAvailable;
  60. unsigned int optionsEnabled;
  61. const char* binary;
  62. const char* name;
  63. const char* label;
  64. const char* maker;
  65. const char* copyright;
  66. const char* iconName;
  67. long uniqueId;
  68. uint32_t latency;
  69. #ifndef DOXYGEN
  70. CarlaPluginInfo()
  71. : type(CarlaBackend::PLUGIN_NONE),
  72. category(CarlaBackend::PLUGIN_CATEGORY_NONE),
  73. hints(0x0),
  74. optionsAvailable(0x0),
  75. optionsEnabled(0x0),
  76. binary(nullptr),
  77. name(nullptr),
  78. label(nullptr),
  79. maker(nullptr),
  80. copyright(nullptr),
  81. iconName(nullptr),
  82. uniqueId(0),
  83. latency(0) {}
  84. ~CarlaPluginInfo()
  85. {
  86. if (label != nullptr)
  87. {
  88. delete[] label;
  89. label = nullptr;
  90. }
  91. if (maker != nullptr)
  92. {
  93. delete[] maker;
  94. maker = nullptr;
  95. }
  96. if (copyright != nullptr)
  97. {
  98. delete[] copyright;
  99. copyright = nullptr;
  100. }
  101. }
  102. CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaPluginInfo)
  103. #endif
  104. };
  105. /*!
  106. * Native plugin information.
  107. * \see carla_get_internal_plugin_info()
  108. */
  109. struct CarlaNativePluginInfo {
  110. CarlaPluginCategory category;
  111. unsigned int hints;
  112. uint32_t audioIns;
  113. uint32_t audioOuts;
  114. uint32_t midiIns;
  115. uint32_t midiOuts;
  116. uint32_t parameterIns;
  117. uint32_t parameterOuts;
  118. const char* name;
  119. const char* label;
  120. const char* maker;
  121. const char* copyright;
  122. #ifndef DOXYGEN
  123. CarlaNativePluginInfo()
  124. : category(CarlaBackend::PLUGIN_CATEGORY_NONE),
  125. hints(0x0),
  126. audioIns(0),
  127. audioOuts(0),
  128. midiIns(0),
  129. midiOuts(0),
  130. parameterIns(0),
  131. parameterOuts(0),
  132. name(nullptr),
  133. label(nullptr),
  134. maker(nullptr),
  135. copyright(nullptr) {}
  136. CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaNativePluginInfo)
  137. #endif
  138. };
  139. /*!
  140. * Port count information, used for Audio and MIDI ports and parameters.
  141. * \see carla_get_audio_port_count_info()
  142. * \see carla_get_midi_port_count_info()
  143. * \see carla_get_parameter_count_info()
  144. */
  145. struct CarlaPortCountInfo {
  146. uint32_t ins;
  147. uint32_t outs;
  148. uint32_t total;
  149. #ifndef DOXYGEN
  150. CarlaPortCountInfo()
  151. : ins(0),
  152. outs(0),
  153. total(0) {}
  154. CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaPortCountInfo)
  155. #endif
  156. };
  157. /*!
  158. * Parameter information.
  159. * \see carla_get_parameter_info()
  160. */
  161. struct CarlaParameterInfo {
  162. const char* name;
  163. const char* symbol;
  164. const char* unit;
  165. uint32_t scalePointCount;
  166. #ifndef DOXYGEN
  167. CarlaParameterInfo()
  168. : name(nullptr),
  169. symbol(nullptr),
  170. unit(nullptr),
  171. scalePointCount(0) {}
  172. ~CarlaParameterInfo()
  173. {
  174. if (name != nullptr)
  175. {
  176. delete[] name;
  177. name = nullptr;
  178. }
  179. if (symbol != nullptr)
  180. {
  181. delete[] symbol;
  182. symbol = nullptr;
  183. }
  184. if (unit != nullptr)
  185. {
  186. delete[] unit;
  187. unit = nullptr;
  188. }
  189. }
  190. CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaParameterInfo)
  191. #endif
  192. };
  193. /*!
  194. * Parameter scale point information.
  195. * \see carla_get_parameter_scalepoint_info()
  196. */
  197. struct CarlaScalePointInfo {
  198. float value;
  199. const char* label;
  200. #ifndef DOXYGEN
  201. CarlaScalePointInfo()
  202. : value(0.0f),
  203. label(nullptr) {}
  204. ~CarlaScalePointInfo()
  205. {
  206. if (label != nullptr)
  207. {
  208. delete[] label;
  209. label = nullptr;
  210. }
  211. }
  212. CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaScalePointInfo)
  213. #endif
  214. };
  215. /*!
  216. * Transport information.
  217. * \see carla_get_transport_info()
  218. */
  219. struct CarlaTransportInfo {
  220. bool playing;
  221. uint32_t frame;
  222. int32_t bar;
  223. int32_t beat;
  224. int32_t tick;
  225. double bpm;
  226. #ifndef DOXYGEN
  227. CarlaTransportInfo()
  228. : playing(false),
  229. frame(0),
  230. bar(0),
  231. beat(0),
  232. bpm(0.0) {}
  233. CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaTransportInfo)
  234. #endif
  235. };
  236. /*!
  237. * Get the complete license text of used third-party code and features.\n
  238. * Returned string is in basic html format.
  239. */
  240. CARLA_EXPORT const char* carla_get_extended_license_text();
  241. /*!
  242. * Get the supported file types in carla_load_filename().\n
  243. * Returned string uses this syntax:
  244. * \code
  245. * "*.ext1;*.ext2;*.ext3"
  246. * \endcode
  247. */
  248. CARLA_EXPORT const char* carla_get_supported_file_types();
  249. /*!
  250. * Get how many engine drivers are available to use.
  251. */
  252. CARLA_EXPORT unsigned int carla_get_engine_driver_count();
  253. /*!
  254. * Get the engine driver name \a index.
  255. */
  256. CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index);
  257. /*!
  258. * Get the device names of the engine driver at \a index (for use in non-JACK drivers).\n
  259. * May return NULL.
  260. */
  261. CARLA_EXPORT const char** carla_get_engine_driver_device_names(unsigned int index);
  262. /*!
  263. * Get how many internal plugins are available to use.
  264. */
  265. CARLA_EXPORT unsigned int carla_get_internal_plugin_count();
  266. /*!
  267. * Get information about the internal plugin \a internalPluginId.
  268. */
  269. CARLA_EXPORT const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int internalPluginId);
  270. /*!
  271. * Initialize the engine with driver \a driverName, using \a clientName for its internal name.\n
  272. * Make sure to call carla_engine_idle() at regular intervals afterwards.
  273. */
  274. CARLA_EXPORT bool carla_engine_init(const char* driverName, const char* clientName);
  275. /*!
  276. * Close the running engine.\n
  277. * This function always closes the engine even if it returns false.\n
  278. * When false is returned, something went wrong when closing the engine, but it was still closed nonetheless.
  279. */
  280. CARLA_EXPORT bool carla_engine_close();
  281. /*!
  282. * Idle the running engine.\n
  283. * \note This should never be called if the engine is not running.
  284. */
  285. CARLA_EXPORT void carla_engine_idle();
  286. /*!
  287. * Check if the engine is running.
  288. */
  289. CARLA_EXPORT bool carla_is_engine_running();
  290. /*!
  291. * Tell the engine it's about to close.\n
  292. * This is used to prevent the engine thread(s) from reactivating.
  293. */
  294. CARLA_EXPORT void carla_set_engine_about_to_close();
  295. /*!
  296. * Set the engine callback function to \a func.
  297. * Use \a ptr to pass a custom pointer to the callback.
  298. */
  299. CARLA_EXPORT void carla_set_engine_callback(CarlaCallbackFunc func, void* ptr);
  300. /*!
  301. * Set the engine option \a option.\n
  302. * With the exception of OPTION_PROCESS_NAME, OPTION_TRANSPORT_MODE and OPTION_PATH_*,
  303. * this function should not be called when the engine is running.
  304. */
  305. CARLA_EXPORT void carla_set_engine_option(CarlaOptionsType option, int value, const char* valueStr);
  306. /*!
  307. * Load \a filename of any type.\n
  308. * This will try to load a generic file as a plugin,
  309. * either by direct handling (GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI).
  310. * \see carla_get_supported_file_types()
  311. */
  312. CARLA_EXPORT bool carla_load_filename(const char* filename);
  313. /*!
  314. * Load \a filename project file.\n
  315. * (project files have *.carxp extension)
  316. * \note Already loaded plugins are not removed; call carla_remove_all_plugins() first if needed.
  317. */
  318. CARLA_EXPORT bool carla_load_project(const char* filename);
  319. /*!
  320. * Save current project to \a filename.\n
  321. * (project files have *.carxp extension)
  322. */
  323. CARLA_EXPORT bool carla_save_project(const char* filename);
  324. /*!
  325. * Connect patchbay ports \a portA and \a portB.
  326. */
  327. CARLA_EXPORT bool carla_patchbay_connect(int portA, int portB);
  328. /*!
  329. * Disconnect patchbay connection \a connectionId.
  330. */
  331. CARLA_EXPORT bool carla_patchbay_disconnect(int connectionId);
  332. /*!
  333. * Force the engine to resend all patchbay clients, ports and connections again.
  334. */
  335. CARLA_EXPORT void carla_patchbay_refresh();
  336. /*!
  337. * Start playback of the engine transport.
  338. */
  339. CARLA_EXPORT void carla_transport_play();
  340. /*!
  341. * Pause the engine transport.
  342. */
  343. CARLA_EXPORT void carla_transport_pause();
  344. /*!
  345. * Relocate the engine transport to \a frames.
  346. */
  347. CARLA_EXPORT void carla_transport_relocate(uint32_t frames);
  348. /*!
  349. * Get the current transport frame.
  350. */
  351. CARLA_EXPORT uint32_t carla_get_current_transport_frame();
  352. /*!
  353. * Get the engine transport information.
  354. */
  355. CARLA_EXPORT const CarlaTransportInfo* carla_get_transport_info();
  356. /*!
  357. * Add new plugin.\n
  358. * If you don't know the binary type, use BINARY_NATIVE.
  359. */
  360. CARLA_EXPORT bool carla_add_plugin(CarlaBinaryType btype, CarlaPluginType ptype, const char* filename, const char* name, const char* label, const void* extraPtr);
  361. /*!
  362. * Remove plugin with id \a pluginId.
  363. */
  364. CARLA_EXPORT bool carla_remove_plugin(unsigned int pluginId);
  365. /*!
  366. * Remove all plugins.
  367. */
  368. CARLA_EXPORT void carla_remove_all_plugins();
  369. /*!
  370. * Rename plugin with id \a pluginId to \a newName. \n
  371. * Returns the new name, or NULL if the operation failed.
  372. */
  373. CARLA_EXPORT const char* carla_rename_plugin(unsigned int pluginId, const char* newName);
  374. /*!
  375. * Clone plugin with id \a pluginId.
  376. */
  377. CARLA_EXPORT bool carla_clone_plugin(unsigned int pluginId);
  378. /*!
  379. * Prepare replace of plugin with id \a pluginId. \n
  380. * The next call to carla_add_plugin() will use this id, replacing the current plugin.
  381. * \note This function requires carla_add_plugin() to be called afterwards as soon as possible.
  382. */
  383. CARLA_EXPORT bool carla_replace_plugin(unsigned int pluginId);
  384. /*!
  385. * Switch plugins with id \a pluginIdA and \a pluginIdB.
  386. */
  387. CARLA_EXPORT bool carla_switch_plugins(unsigned int pluginIdA, unsigned int pluginIdB);
  388. /*!
  389. * Load the plugin state at \a filename.\n
  390. * (Plugin states have *.carxs extension).
  391. * \see carla_save_plugin_state()
  392. */
  393. CARLA_EXPORT bool carla_load_plugin_state(unsigned int pluginId, const char* filename);
  394. /*!
  395. * Load the plugin state at \a filename.\n
  396. * (Plugin states have *.carxs extension).
  397. * \see carla_load_plugin_state()
  398. */
  399. CARLA_EXPORT bool carla_save_plugin_state(unsigned int pluginId, const char* filename);
  400. /*!
  401. * Get a plugin's information.
  402. */
  403. CARLA_EXPORT const CarlaPluginInfo* carla_get_plugin_info(unsigned int pluginId);
  404. /*!
  405. * Get a plugin's audio port count information.
  406. */
  407. CARLA_EXPORT const CarlaPortCountInfo* carla_get_audio_port_count_info(unsigned int pluginId);
  408. /*!
  409. * Get a plugin's midi port count information.
  410. */
  411. CARLA_EXPORT const CarlaPortCountInfo* carla_get_midi_port_count_info(unsigned int pluginId);
  412. /*!
  413. * Get a plugin's parameter count information.
  414. */
  415. CARLA_EXPORT const CarlaPortCountInfo* carla_get_parameter_count_info(unsigned int pluginId);
  416. /*!
  417. * * Get a plugin's parameter information.
  418. */
  419. CARLA_EXPORT const CarlaParameterInfo* carla_get_parameter_info(unsigned int pluginId, uint32_t parameterId);
  420. /*!
  421. * Get a plugin's parameter scale point information.
  422. */
  423. CARLA_EXPORT const CarlaScalePointInfo* carla_get_parameter_scalepoint_info(unsigned int pluginId, uint32_t parameterId, uint32_t scalePointId);
  424. /*!
  425. * Get a plugin's parameter data.
  426. */
  427. CARLA_EXPORT const CarlaParameterData* carla_get_parameter_data(unsigned int pluginId, uint32_t parameterId);
  428. /*!
  429. * Get a plugin's parameter ranges.
  430. */
  431. CARLA_EXPORT const CarlaParameterRanges* carla_get_parameter_ranges(unsigned int pluginId, uint32_t parameterId);
  432. /*!
  433. * Get a plugin's midi program data.
  434. */
  435. CARLA_EXPORT const CarlaMidiProgramData* carla_get_midi_program_data(unsigned int pluginId, uint32_t midiProgramId);
  436. /*!
  437. * Get a plugin's custom data.
  438. */
  439. CARLA_EXPORT const CarlaCustomData* carla_get_custom_data(unsigned int pluginId, uint32_t customDataId);
  440. /*!
  441. * Get a plugin's chunk data.
  442. */
  443. CARLA_EXPORT const char* carla_get_chunk_data(unsigned int pluginId);
  444. /*!
  445. * Get how many parameters a plugin has.
  446. */
  447. CARLA_EXPORT uint32_t carla_get_parameter_count(unsigned int pluginId);
  448. /*!
  449. * Get how many programs a plugin has.
  450. */
  451. CARLA_EXPORT uint32_t carla_get_program_count(unsigned int pluginId);
  452. /*!
  453. * Get how many midi programs a plugin has.
  454. */
  455. CARLA_EXPORT uint32_t carla_get_midi_program_count(unsigned int pluginId);
  456. /*!
  457. * Get how many custom data sets a plugin has.
  458. * \see carla_prepare_for_save()
  459. */
  460. CARLA_EXPORT uint32_t carla_get_custom_data_count(unsigned int pluginId);
  461. /*!
  462. * Get a plugin's custom parameter text display.
  463. * \see PARAMETER_USES_CUSTOM_TEXT
  464. */
  465. CARLA_EXPORT const char* carla_get_parameter_text(unsigned int pluginId, uint32_t parameterId);
  466. /*!
  467. * Get a plugin's program name.
  468. */
  469. CARLA_EXPORT const char* carla_get_program_name(unsigned int pluginId, uint32_t programId);
  470. /*!
  471. * Get a plugin's midi program name.
  472. */
  473. CARLA_EXPORT const char* carla_get_midi_program_name(unsigned int pluginId, uint32_t midiProgramId);
  474. /*!
  475. * Get the plugin's real name.\n
  476. * This is the name the plugin uses to identify itself; may not be unique.
  477. */
  478. CARLA_EXPORT const char* carla_get_real_plugin_name(unsigned int pluginId);
  479. /*!
  480. * Get the current plugin's program index.
  481. */
  482. CARLA_EXPORT int32_t carla_get_current_program_index(unsigned int pluginId);
  483. /*!
  484. * Get the current plugin's midi program index.
  485. */
  486. CARLA_EXPORT int32_t carla_get_current_midi_program_index(unsigned int pluginId);
  487. /*!
  488. * Get a plugin's default parameter value.
  489. */
  490. CARLA_EXPORT float carla_get_default_parameter_value(unsigned int pluginId, uint32_t parameterId);
  491. /*!
  492. * Get a plugin's current parameter value.
  493. */
  494. CARLA_EXPORT float carla_get_current_parameter_value(unsigned int pluginId, uint32_t parameterId);
  495. /*!
  496. * Get a plugin's input peak value.\n
  497. * \a portId must only be either 1 or 2
  498. */
  499. CARLA_EXPORT float carla_get_input_peak_value(unsigned int pluginId, unsigned short portId);
  500. /*!
  501. * Get a plugin's output peak value.\n
  502. * \a portId must only be either 1 or 2
  503. */
  504. CARLA_EXPORT float carla_get_output_peak_value(unsigned int pluginId, unsigned short portId);
  505. /*!
  506. * Enable a plugin's option.
  507. * \see PluginOptions
  508. */
  509. CARLA_EXPORT void carla_set_option(unsigned int pluginId, unsigned int option, bool yesNo);
  510. /*!
  511. * Enable or disable a plugin according to \a onOff.
  512. */
  513. CARLA_EXPORT void carla_set_active(unsigned int pluginId, bool onOff);
  514. #ifndef BUILD_BRIDGE
  515. /*!
  516. * Change a plugin's internal drywet value to \a value.
  517. */
  518. CARLA_EXPORT void carla_set_drywet(unsigned int pluginId, float value);
  519. /*!
  520. * Change a plugin's internal volume value to \a value.
  521. */
  522. CARLA_EXPORT void carla_set_volume(unsigned int pluginId, float value);
  523. /*!
  524. * Change a plugin's internal balance-left value to \a value.
  525. */
  526. CARLA_EXPORT void carla_set_balance_left(unsigned int pluginId, float value);
  527. /*!
  528. * Change a plugin's internal balance-right value to \a value.
  529. */
  530. CARLA_EXPORT void carla_set_balance_right(unsigned int pluginId, float value);
  531. /*!
  532. * Change a plugin's internal panning value to \a value.
  533. */
  534. CARLA_EXPORT void carla_set_panning(unsigned int pluginId, float value);
  535. #endif
  536. /*!
  537. * Change a plugin's internal control channel to \a channel.
  538. */
  539. CARLA_EXPORT void carla_set_ctrl_channel(unsigned int pluginId, int8_t channel);
  540. /*!
  541. * Set the plugin's parameter \a parameterId to \a value.
  542. */
  543. CARLA_EXPORT void carla_set_parameter_value(unsigned int pluginId, uint32_t parameterId, float value);
  544. #ifndef BUILD_BRIDGE
  545. /*!
  546. * Set the plugin's parameter \a parameterId midi channel to \a channel.
  547. */
  548. CARLA_EXPORT void carla_set_parameter_midi_channel(unsigned int pluginId, uint32_t parameterId, uint8_t channel);
  549. /*!
  550. * Set the plugin's parameter \a parameterId midi cc to \a cc.
  551. */
  552. CARLA_EXPORT void carla_set_parameter_midi_cc(unsigned int pluginId, uint32_t parameterId, int16_t cc);
  553. #endif
  554. /*!
  555. * Change a plugin's program to \a programId.
  556. */
  557. CARLA_EXPORT void carla_set_program(unsigned int pluginId, uint32_t programId);
  558. /*!
  559. * Change a plugin's midi program to \a midiProgramId.
  560. */
  561. CARLA_EXPORT void carla_set_midi_program(unsigned int pluginId, uint32_t midiProgramId);
  562. /*!
  563. * Set a plugin's custom data set.
  564. */
  565. CARLA_EXPORT void carla_set_custom_data(unsigned int pluginId, const char* type, const char* key, const char* value);
  566. /*!
  567. * Set a plugin's chunk data.
  568. */
  569. CARLA_EXPORT void carla_set_chunk_data(unsigned int pluginId, const char* chunkData);
  570. /*!
  571. * Tell a plugin to prepare for save.\n
  572. * This should be called before carla_get_custom_data_count().
  573. */
  574. CARLA_EXPORT void carla_prepare_for_save(unsigned int pluginId);
  575. #ifndef BUILD_BRIDGE
  576. /*!
  577. * Send a single note of a plugin.\n
  578. * If \a note if 0, note-off is sent; note-on otherwise.
  579. */
  580. CARLA_EXPORT void carla_send_midi_note(unsigned int pluginId, uint8_t channel, uint8_t note, uint8_t velocity);
  581. #endif
  582. /*!
  583. * Tell a plugin to show its own custom UI.
  584. * \see PLUGIN_HAS_GUI
  585. */
  586. CARLA_EXPORT void carla_show_gui(unsigned int pluginId, bool yesNo);
  587. /*!
  588. * Get the current engine buffer size.
  589. */
  590. CARLA_EXPORT uint32_t carla_get_buffer_size();
  591. /*!
  592. * Get the current engine sample rate.
  593. */
  594. CARLA_EXPORT double carla_get_sample_rate();
  595. /*!
  596. * Get the last error.
  597. */
  598. CARLA_EXPORT const char* carla_get_last_error();
  599. /*!
  600. * Get the current engine OSC URL (TCP).
  601. */
  602. CARLA_EXPORT const char* carla_get_host_osc_url_tcp();
  603. /*!
  604. * Get the current engine OSC URL (UDP).
  605. */
  606. CARLA_EXPORT const char* carla_get_host_osc_url_udp();
  607. /*!
  608. * Send NSM announce message.
  609. */
  610. CARLA_EXPORT void carla_nsm_announce(const char* url, const char* appName, int pid);
  611. /*!
  612. * Ready for handling NSM messages.
  613. */
  614. CARLA_EXPORT void carla_nsm_ready();
  615. /*!
  616. * Reply to NSM open message.
  617. * \see CALLBACK_NSM_OPEN
  618. */
  619. CARLA_EXPORT void carla_nsm_reply_open();
  620. /*!
  621. * Reply to NSM save message.
  622. * \see CALLBACK_NSM_SAVE
  623. */
  624. CARLA_EXPORT void carla_nsm_reply_save();
  625. #ifdef BUILD_BRIDGE
  626. using CarlaBackend::CarlaEngine;
  627. CARLA_EXPORT CarlaEngine* carla_get_standalone_engine();
  628. CARLA_EXPORT bool carla_engine_init_bridge(const char* audioBaseName, const char* controlBaseName, const char* clientName);
  629. #endif
  630. /**@}*/
  631. #endif // __CARLA_STANDALONE_HPP__