The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

96 lines
3.1KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 6 End-User License
  8. Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
  9. End User License Agreement: www.juce.com/juce-6-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. // Forward declaration to avoid leaking implementation details.
  19. namespace Steinberg
  20. {
  21. class FUnknown;
  22. using TUID = char[16];
  23. }
  24. namespace juce
  25. {
  26. /** An interface to allow an AudioProcessor to implement extended VST3-specific
  27. functionality.
  28. To use this class, ensure that your AudioProcessor publicly inherits
  29. from VST3ClientExtensions.
  30. @see VSTCallbackHandler
  31. @tags{Audio}
  32. */
  33. struct VST3ClientExtensions
  34. {
  35. virtual ~VST3ClientExtensions() = default;
  36. /** This function may be used by implementations of queryInterface()
  37. in the VST3's implementation of IEditController to return
  38. additional supported interfaces.
  39. */
  40. virtual int32_t queryIEditController (const Steinberg::TUID, void** obj)
  41. {
  42. *obj = nullptr;
  43. return -1;
  44. }
  45. /** This function may be used by implementations of queryInterface()
  46. in the VST3's implementation of IAudioProcessor to return
  47. additional supported interfaces.
  48. */
  49. virtual int32_t queryIAudioProcessor (const Steinberg::TUID, void** obj)
  50. {
  51. *obj = nullptr;
  52. return -1;
  53. }
  54. /** This may be called by the VST3 wrapper when the host sets an
  55. IComponentHandler for the plugin to use.
  56. You should not make any assumptions about how and when this will be
  57. called - this function may not be called at all!
  58. */
  59. virtual void setIComponentHandler (Steinberg::FUnknown*) {}
  60. /** This may be called shortly after the AudioProcessor is constructed
  61. with the current IHostApplication.
  62. You should not make any assumptions about how and when this will be
  63. called - this function may not be called at all!
  64. */
  65. virtual void setIHostApplication (Steinberg::FUnknown*) {}
  66. /** This function will be called to check whether the first input bus
  67. should be designated as "kMain" or "kAux". Return true if the
  68. first bus should be kMain, or false if the bus should be kAux.
  69. All other input buses will always be designated kAux.
  70. */
  71. virtual bool getPluginHasMainInput() const { return true; }
  72. };
  73. } // namespace juce