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.

76 lines
2.8KB

  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. namespace juce
  19. {
  20. /** An interface to allow an AudioProcessor to send and receive VST specific calls from
  21. the host.
  22. @tags{Audio}
  23. */
  24. struct VSTCallbackHandler
  25. {
  26. virtual ~VSTCallbackHandler() = default;
  27. /** This is called by the VST plug-in wrapper when it receives unhandled
  28. plug-in "can do" calls from the host.
  29. */
  30. virtual pointer_sized_int handleVstPluginCanDo (int32 index,
  31. pointer_sized_int value,
  32. void* ptr,
  33. float opt)
  34. {
  35. ignoreUnused (index, value, ptr, opt);
  36. return 0;
  37. }
  38. /** This is called by the VST plug-in wrapper when it receives unhandled
  39. vendor specific calls from the host.
  40. */
  41. virtual pointer_sized_int handleVstManufacturerSpecific (int32 index,
  42. pointer_sized_int value,
  43. void* ptr,
  44. float opt) = 0;
  45. // Note: VS2013 prevents a "using" declaration here
  46. /** The host callback function type. */
  47. typedef pointer_sized_int (VstHostCallbackType) (int32 opcode,
  48. int32 index,
  49. pointer_sized_int value,
  50. void* ptr,
  51. float opt);
  52. /** This is called once by the VST plug-in wrapper after its constructor.
  53. You can use the supplied function to query the VST host.
  54. */
  55. virtual void handleVstHostCallbackAvailable (std::function<VstHostCallbackType>&& callback)
  56. {
  57. ignoreUnused (callback);
  58. }
  59. };
  60. } // namespace juce