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.

74 lines
2.6KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 7 technical preview.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For the technical preview this file cannot be licensed commercially.
  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. To use this class, ensure that your AudioProcessor publicly inherits
  18. from VSTCallbackHandler.
  19. @see VST3ClientExtensions
  20. @tags{Audio}
  21. */
  22. struct VSTCallbackHandler
  23. {
  24. virtual ~VSTCallbackHandler() = default;
  25. /** This is called by the VST plug-in wrapper when it receives unhandled
  26. plug-in "can do" calls from the host.
  27. */
  28. virtual pointer_sized_int handleVstPluginCanDo (int32 index,
  29. pointer_sized_int value,
  30. void* ptr,
  31. float opt)
  32. {
  33. ignoreUnused (index, value, ptr, opt);
  34. return 0;
  35. }
  36. /** This is called by the VST plug-in wrapper when it receives unhandled
  37. vendor specific calls from the host.
  38. */
  39. virtual pointer_sized_int handleVstManufacturerSpecific (int32 index,
  40. pointer_sized_int value,
  41. void* ptr,
  42. float opt) = 0;
  43. // Note: VS2013 prevents a "using" declaration here
  44. /** The host callback function type. */
  45. typedef pointer_sized_int (VstHostCallbackType) (int32 opcode,
  46. int32 index,
  47. pointer_sized_int value,
  48. void* ptr,
  49. float opt);
  50. /** This is called once by the VST plug-in wrapper after its constructor.
  51. You can use the supplied function to query the VST host.
  52. */
  53. virtual void handleVstHostCallbackAvailable (std::function<VstHostCallbackType>&& callback)
  54. {
  55. ignoreUnused (callback);
  56. }
  57. };
  58. } // namespace juce