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.

83 lines
3.0KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCE_AUDIOPLUGININSTANCE_H_INCLUDED
  18. #define JUCE_AUDIOPLUGININSTANCE_H_INCLUDED
  19. //==============================================================================
  20. /**
  21. Base class for an active instance of a plugin.
  22. This derives from the AudioProcessor class, and adds some extra functionality
  23. that helps when wrapping dynamically loaded plugins.
  24. @see AudioProcessor, AudioPluginFormat
  25. */
  26. class JUCE_API AudioPluginInstance : public AudioProcessor
  27. {
  28. public:
  29. //==============================================================================
  30. /** Destructor.
  31. Make sure that you delete any UI components that belong to this plugin before
  32. deleting the plugin.
  33. */
  34. virtual ~AudioPluginInstance() {}
  35. //==============================================================================
  36. /** Fills-in the appropriate parts of this plugin description object. */
  37. virtual void fillInPluginDescription (PluginDescription& description) const = 0;
  38. /** Returns a PluginDescription for this plugin.
  39. This is just a convenience method to avoid calling fillInPluginDescription.
  40. */
  41. PluginDescription getPluginDescription() const
  42. {
  43. PluginDescription desc;
  44. fillInPluginDescription (desc);
  45. return desc;
  46. }
  47. /** Returns a pointer to some kind of platform-specific data about the plugin.
  48. E.g. For a VST, this value can be cast to an AEffect*. For an AudioUnit, it can be
  49. cast to an AudioUnit handle.
  50. */
  51. virtual void* getPlatformSpecificData() { return nullptr; }
  52. /** For some formats (currently AudioUnit), this forces a reload of the list of
  53. available parameters.
  54. */
  55. virtual void refreshParameterList() {}
  56. protected:
  57. //==============================================================================
  58. AudioPluginInstance() {}
  59. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginInstance)
  60. };
  61. #endif // JUCE_AUDIOPLUGININSTANCE_H_INCLUDED