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.

juce_VST3ClientExtensions.h 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2022 - 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 7 End-User License
  8. Agreement and JUCE Privacy Policy.
  9. End User License Agreement: www.juce.com/juce-7-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. #ifndef DOXYGEN
  19. // Forward declaration to avoid leaking implementation details.
  20. namespace Steinberg
  21. {
  22. class FUnknown;
  23. using TUID = char[16];
  24. } // namespace Steinberg
  25. #endif
  26. namespace juce
  27. {
  28. /** An interface to allow an AudioProcessor to implement extended VST3-specific
  29. functionality.
  30. To use this class, ensure that your AudioProcessor publicly inherits
  31. from VST3ClientExtensions.
  32. @see VSTCallbackHandler
  33. @tags{Audio}
  34. */
  35. struct VST3ClientExtensions
  36. {
  37. virtual ~VST3ClientExtensions() = default;
  38. /** This function may be used by implementations of queryInterface()
  39. in the VST3's implementation of IEditController to return
  40. additional supported interfaces.
  41. */
  42. virtual int32_t queryIEditController (const Steinberg::TUID, void** obj)
  43. {
  44. *obj = nullptr;
  45. return -1;
  46. }
  47. /** This function may be used by implementations of queryInterface()
  48. in the VST3's implementation of IAudioProcessor to return
  49. additional supported interfaces.
  50. */
  51. virtual int32_t queryIAudioProcessor (const Steinberg::TUID, void** obj)
  52. {
  53. *obj = nullptr;
  54. return -1;
  55. }
  56. /** This may be called by the VST3 wrapper when the host sets an
  57. IComponentHandler for the plugin to use.
  58. You should not make any assumptions about how and when this will be
  59. called - this function may not be called at all!
  60. */
  61. virtual void setIComponentHandler (Steinberg::FUnknown*) {}
  62. /** This may be called shortly after the AudioProcessor is constructed
  63. with the current IHostApplication.
  64. You should not make any assumptions about how and when this will be
  65. called - this function may not be called at all!
  66. */
  67. virtual void setIHostApplication (Steinberg::FUnknown*) {}
  68. /** This function will be called to check whether the first input bus
  69. should be designated as "kMain" or "kAux". Return true if the
  70. first bus should be kMain, or false if the bus should be kAux.
  71. All other input buses will always be designated kAux.
  72. */
  73. virtual bool getPluginHasMainInput() const { return true; }
  74. };
  75. } // namespace juce