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.

92 lines
2.5KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 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 doc/GPL.txt file.
  16. */
  17. #include "carla-native-base.cpp"
  18. #include "CarlaString.hpp"
  19. // -----------------------------------------------------------------------
  20. // LV2 descriptor functions
  21. // -----------------------------------------------------------------------
  22. // Static LV2 Descriptor objects
  23. // -----------------------------------------------------------------------
  24. // Startup code
  25. // CARLA_EXPORT void lv2_generate_ttl(const char* basename)
  26. // {
  27. // createLv2Files (basename);
  28. // }
  29. CARLA_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index)
  30. {
  31. if (index >= sPluginDescsMgr.descs.count())
  32. return nullptr;
  33. if (index < sPluginDescsMgr.lv2Descs.count())
  34. return sPluginDescsMgr.lv2Descs.getAt(index);
  35. const PluginDescriptor*& pluginDesc(sPluginDescsMgr.descs.getAt(index));
  36. CarlaString tmpURI;
  37. if (std::strcmp(pluginDesc->label, "carla") == 0)
  38. {
  39. tmpURI = "http://kxstudio.sf.net/carla";
  40. }
  41. else
  42. {
  43. tmpURI = "http://kxstudio.sf.net/carla/plugins/";
  44. tmpURI += pluginDesc->label;
  45. }
  46. LV2_Descriptor* lv2Desc(new LV2_Descriptor);
  47. lv2Desc->URI = carla_strdup(tmpURI);
  48. lv2Desc->instantiate = nullptr;
  49. lv2Desc->connect_port = nullptr;
  50. lv2Desc->activate = nullptr;
  51. lv2Desc->run = nullptr;
  52. lv2Desc->deactivate = nullptr;
  53. lv2Desc->cleanup = nullptr;
  54. lv2Desc->extension_data = nullptr;
  55. sPluginDescsMgr.lv2Descs.append(lv2Desc);
  56. return lv2Desc;
  57. }
  58. // CARLA_EXPORT const LV2UI_Descriptor* lv2ui_descriptor(uint32_t index)
  59. // {
  60. // switch (index)
  61. // {
  62. // case 0:
  63. // return &JuceLv2UI_External;
  64. // case 1:
  65. // return &JuceLv2UI_Parent;
  66. // default:
  67. // return nullptr;
  68. // }
  69. // }
  70. // -----------------------------------------------------------------------
  71. int main()
  72. {
  73. return 0;
  74. }