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.

147 lines
4.1KB

  1. /*
  2. * DISTRHO Ildaeil Plugin
  3. * Copyright (C) 2021 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 3 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 LICENSE file.
  16. */
  17. #include "DistrhoPlugin.hpp"
  18. START_NAMESPACE_DISTRHO
  19. // -----------------------------------------------------------------------------------------------------------
  20. class IldaeilPlugin : public Plugin
  21. {
  22. public:
  23. IldaeilPlugin()
  24. : Plugin(0, 0, 0)
  25. {
  26. }
  27. ~IldaeilPlugin() override
  28. {
  29. }
  30. protected:
  31. /* --------------------------------------------------------------------------------------------------------
  32. * Information */
  33. /**
  34. Get the plugin label.
  35. A plugin label follows the same rules as Parameter::symbol, with the exception that it can start with numbers.
  36. */
  37. const char* getLabel() const override
  38. {
  39. return "Ildaeil";
  40. }
  41. /**
  42. Get an extensive comment/description about the plugin.
  43. */
  44. const char* getDescription() const override
  45. {
  46. return "...";
  47. }
  48. /**
  49. Get the plugin author/maker.
  50. */
  51. const char* getMaker() const override
  52. {
  53. return "DISTRHO";
  54. }
  55. /**
  56. Get the plugin homepage.
  57. */
  58. const char* getHomePage() const override
  59. {
  60. return "https://github.com/DISTRHO/Ildaeil";
  61. }
  62. /**
  63. Get the plugin license name (a single line of text).
  64. For commercial plugins this should return some short copyright information.
  65. */
  66. const char* getLicense() const override
  67. {
  68. return "ISC";
  69. }
  70. /**
  71. Get the plugin version, in hexadecimal.
  72. */
  73. uint32_t getVersion() const override
  74. {
  75. return d_version(1, 0, 0);
  76. }
  77. /**
  78. Get the plugin unique Id.
  79. This value is used by LADSPA, DSSI and VST plugin formats.
  80. */
  81. int64_t getUniqueId() const override
  82. {
  83. #if DISTRHO_PLUGIN_IS_SYNTH
  84. return d_cconst('d', 'I', 'l', 'S');
  85. #elif DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
  86. return d_cconst('d', 'I', 'l', 'M');
  87. #else
  88. return d_cconst('d', 'I', 'l', 'F');
  89. #endif
  90. }
  91. /* --------------------------------------------------------------------------------------------------------
  92. * Init */
  93. /* --------------------------------------------------------------------------------------------------------
  94. * Internal data */
  95. /* --------------------------------------------------------------------------------------------------------
  96. * Process */
  97. /**
  98. Run/process function for plugins without MIDI input.
  99. */
  100. void run(const float** inputs, float** outputs, uint32_t frames) override
  101. {
  102. // copy inputs over outputs if needed
  103. if (outputs[0] != inputs[0])
  104. std::memcpy(outputs[0], inputs[0], sizeof(float)*frames);
  105. if (outputs[1] != inputs[1])
  106. std::memcpy(outputs[1], inputs[1], sizeof(float)*frames);
  107. }
  108. // -------------------------------------------------------------------------------------------------------
  109. private:
  110. /**
  111. Set our plugin class as non-copyable and add a leak detector just in case.
  112. */
  113. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(IldaeilPlugin)
  114. };
  115. /* ------------------------------------------------------------------------------------------------------------
  116. * Plugin entry point, called by DPF to create a new plugin instance. */
  117. Plugin* createPlugin()
  118. {
  119. return new IldaeilPlugin();
  120. }
  121. // -----------------------------------------------------------------------------------------------------------
  122. END_NAMESPACE_DISTRHO