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.

110 lines
3.2KB

  1. /*
  2. * DISTRHO Plugin Framework (DPF)
  3. * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. * or without fee is hereby granted, provided that the above copyright notice and this
  7. * permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  10. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  11. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  13. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef DISTRHO_PLUGIN_CHECKS_H_INCLUDED
  17. #define DISTRHO_PLUGIN_CHECKS_H_INCLUDED
  18. #include "DistrhoPluginInfo.h"
  19. // -----------------------------------------------------------------------
  20. // Check if all required macros are defined
  21. #ifndef DISTRHO_PLUGIN_NAME
  22. # error DISTRHO_PLUGIN_NAME undefined!
  23. #endif
  24. #ifndef DISTRHO_PLUGIN_HAS_UI
  25. # error DISTRHO_PLUGIN_HAS_UI undefined!
  26. #endif
  27. #ifndef DISTRHO_PLUGIN_IS_SYNTH
  28. # error DISTRHO_PLUGIN_IS_SYNTH undefined!
  29. #endif
  30. #ifndef DISTRHO_PLUGIN_NUM_INPUTS
  31. # error DISTRHO_PLUGIN_NUM_INPUTS undefined!
  32. #endif
  33. #ifndef DISTRHO_PLUGIN_NUM_OUTPUTS
  34. # error DISTRHO_PLUGIN_NUM_OUTPUTS undefined!
  35. #endif
  36. #ifndef DISTRHO_PLUGIN_WANT_LATENCY
  37. # error DISTRHO_PLUGIN_WANT_LATENCY undefined!
  38. #endif
  39. #ifndef DISTRHO_PLUGIN_WANT_PROGRAMS
  40. # error DISTRHO_PLUGIN_WANT_PROGRAMS undefined!
  41. #endif
  42. #ifndef DISTRHO_PLUGIN_WANT_STATE
  43. # error DISTRHO_PLUGIN_WANT_STATE undefined!
  44. #endif
  45. #ifndef DISTRHO_PLUGIN_WANT_TIMEPOS
  46. # error DISTRHO_PLUGIN_WANT_TIMEPOS undefined!
  47. #endif
  48. // -----------------------------------------------------------------------
  49. // Test if synth has audio outputs
  50. #if DISTRHO_PLUGIN_IS_SYNTH && DISTRHO_PLUGIN_NUM_OUTPUTS == 0
  51. # error Synths need audio output to work!
  52. #endif
  53. // -----------------------------------------------------------------------
  54. // Enable MIDI input if synth, test if midi-input disabled when synth
  55. #ifndef DISTRHO_PLUGIN_HAS_MIDI_INPUT
  56. # define DISTRHO_PLUGIN_HAS_MIDI_INPUT DISTRHO_PLUGIN_IS_SYNTH
  57. #elif DISTRHO_PLUGIN_IS_SYNTH && ! DISTRHO_PLUGIN_HAS_MIDI_INPUT
  58. # error Synths need MIDI input to work!
  59. #endif
  60. // -----------------------------------------------------------------------
  61. // Define optional macros if not done yet
  62. #ifndef DISTRHO_PLUGIN_HAS_MIDI_OUTPUT
  63. # define DISTRHO_PLUGIN_HAS_MIDI_OUTPUT 0
  64. #endif
  65. #ifndef DISTRHO_PLUGIN_IS_RT_SAFE
  66. # define DISTRHO_PLUGIN_IS_RT_SAFE 0
  67. #endif
  68. #ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
  69. # define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0
  70. #endif
  71. #ifndef DISTRHO_UI_USE_NANOVG
  72. # define DISTRHO_UI_USE_NANOVG 0
  73. #endif
  74. #ifndef DISTRHO_UI_USE_NTK
  75. # define DISTRHO_UI_USE_NTK 0
  76. #endif
  77. // -----------------------------------------------------------------------
  78. // Define DISTRHO_UI_URI if needed
  79. #ifndef DISTRHO_UI_URI
  80. # define DISTRHO_UI_URI DISTRHO_PLUGIN_URI "#UI"
  81. #endif
  82. // -----------------------------------------------------------------------
  83. #endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED