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.

69 lines
2.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. namespace juce
  14. {
  15. /** An interface to allow an AudioProcessor to send and receive VST specific calls from
  16. the host.
  17. @tags{Audio}
  18. */
  19. struct VSTCallbackHandler
  20. {
  21. virtual ~VSTCallbackHandler() = default;
  22. /** This is called by the VST plug-in wrapper when it receives unhandled
  23. plug-in "can do" calls from the host.
  24. */
  25. virtual pointer_sized_int handleVstPluginCanDo (int32 index,
  26. pointer_sized_int value,
  27. void* ptr,
  28. float opt)
  29. {
  30. ignoreUnused (index, value, ptr, opt);
  31. return 0;
  32. }
  33. /** This is called by the VST plug-in wrapper when it receives unhandled
  34. vendor specific calls from the host.
  35. */
  36. virtual pointer_sized_int handleVstManufacturerSpecific (int32 index,
  37. pointer_sized_int value,
  38. void* ptr,
  39. float opt) = 0;
  40. // Note: VS2013 prevents a "using" declaration here
  41. /** The host callback function type. */
  42. typedef pointer_sized_int (VstHostCallbackType) (int32 opcode,
  43. int32 index,
  44. pointer_sized_int value,
  45. void* ptr,
  46. float opt);
  47. /** This is called once by the VST plug-in wrapper after its constructor.
  48. You can use the supplied function to query the VST host.
  49. */
  50. virtual void handleVstHostCallbackAvailable (std::function<VstHostCallbackType>&& callback)
  51. {
  52. ignoreUnused (callback);
  53. }
  54. };
  55. } // namespace juce