DISTRHO Plugin Framework
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.

146 lines
4.5KB

  1. /*
  2. * Simple Gain audio effect for DISTRHO Plugin Framework (DPF)
  3. * SPDX-License-Identifier: MIT
  4. *
  5. * Copyright (C) 2021 Jean Pierre Cimalando <jp-dev@inbox.ru>
  6. * Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
  7. *
  8. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  9. * or without fee is hereby granted, provided that the above copyright notice and this
  10. * permission notice appear in all copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  13. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  14. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  15. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  16. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  17. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. The plugin name.@n
  21. This is used to identify your plugin before a Plugin instance can be created.
  22. @note This macro is required.
  23. */
  24. #define DISTRHO_PLUGIN_NAME "ImguiSimpleGain"
  25. /**
  26. Number of audio inputs the plugin has.
  27. @note This macro is required.
  28. */
  29. #define DISTRHO_PLUGIN_NUM_INPUTS 2
  30. /**
  31. Number of audio outputs the plugin has.
  32. @note This macro is required.
  33. */
  34. #define DISTRHO_PLUGIN_NUM_OUTPUTS 2
  35. /**
  36. The plugin URI when exporting in LV2 format.
  37. @note This macro is required.
  38. */
  39. #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/imguisimplegain"
  40. /**
  41. Wherever the plugin has a custom %UI.
  42. @see DISTRHO_UI_USE_NANOVG
  43. @see UI
  44. */
  45. #define DISTRHO_PLUGIN_HAS_UI 1
  46. /**
  47. Wherever the plugin processing is realtime-safe.@n
  48. TODO - list rtsafe requirements
  49. */
  50. #define DISTRHO_PLUGIN_IS_RT_SAFE 1
  51. /**
  52. Wherever the plugin is a synth.@n
  53. @ref DISTRHO_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
  54. @see DISTRHO_PLUGIN_WANT_MIDI_INPUT
  55. */
  56. #define DISTRHO_PLUGIN_IS_SYNTH 0
  57. /**
  58. Enable direct access between the %UI and plugin code.
  59. @see UI::getPluginInstancePointer()
  60. @note DO NOT USE THIS UNLESS STRICTLY NECESSARY!!
  61. Try to avoid it at all costs!
  62. */
  63. #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0
  64. /**
  65. Wherever the plugin introduces latency during audio or midi processing.
  66. @see Plugin::setLatency(uint32_t)
  67. */
  68. #define DISTRHO_PLUGIN_WANT_LATENCY 0
  69. /**
  70. Wherever the plugin wants MIDI input.@n
  71. This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.
  72. */
  73. #define DISTRHO_PLUGIN_WANT_MIDI_INPUT 0
  74. /**
  75. Wherever the plugin wants MIDI output.
  76. @see Plugin::writeMidiEvent(const MidiEvent&)
  77. */
  78. #define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 0
  79. /**
  80. Wherever the plugin provides its own internal programs.
  81. @see Plugin::initProgramName(uint32_t, String&)
  82. @see Plugin::loadProgram(uint32_t)
  83. */
  84. #define DISTRHO_PLUGIN_WANT_PROGRAMS 1
  85. /**
  86. Wherever the plugin uses internal non-parameter data.
  87. @see Plugin::initState(uint32_t, String&, String&)
  88. @see Plugin::setState(const char*, const char*)
  89. */
  90. #define DISTRHO_PLUGIN_WANT_STATE 0
  91. /**
  92. Wherever the plugin wants time position information from the host.
  93. @see Plugin::getTimePosition()
  94. */
  95. #define DISTRHO_PLUGIN_WANT_TIMEPOS 0
  96. /**
  97. Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
  98. When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.
  99. */
  100. #define DISTRHO_UI_USE_NANOVG 0
  101. /**
  102. The %UI URI when exporting in LV2 format.@n
  103. By default this is set to @ref DISTRHO_PLUGIN_URI with "#UI" as suffix.
  104. */
  105. #define DISTRHO_UI_URI DISTRHO_PLUGIN_URI "#UI"
  106. /**
  107. Wherever the %UI uses a custom toolkit implementation based on OpenGL.@n
  108. When enabled, the macros @ref DISTRHO_UI_CUSTOM_INCLUDE_PATH and @ref DISTRHO_UI_CUSTOM_WIDGET_TYPE are required.
  109. */
  110. #define DISTRHO_UI_USE_CUSTOM 1
  111. /**
  112. The include path to the header file used by the custom toolkit implementation.
  113. This path must be relative to dpf/distrho/DistrhoUI.hpp
  114. @see DISTRHO_UI_USE_CUSTOM
  115. */
  116. #define DISTRHO_UI_CUSTOM_INCLUDE_PATH "ImGuiUI.hpp"
  117. /**
  118. The top-level-widget typedef to use for the custom toolkit.
  119. This widget class MUST be a subclass of DGL TopLevelWindow class.
  120. It is recommended that you keep this widget class inside the DGL namespace,
  121. and define widget type as e.g. DGL_NAMESPACE::MyCustomTopLevelWidget.
  122. @see DISTRHO_UI_USE_CUSTOM
  123. */
  124. #define DISTRHO_UI_CUSTOM_WIDGET_TYPE DGL_NAMESPACE::ImGuiUI
  125. #define DISTRHO_UI_USER_RESIZABLE 1