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.

164 lines
5.5KB

  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. #ifdef JUCE_AUDIO_PROCESSORS_H_INCLUDED
  19. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  20. already included any other headers - just put it inside a file on its own, possibly with your config
  21. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  22. header files that the compiler may be using.
  23. */
  24. #error "Incorrect use of JUCE cpp file"
  25. #endif
  26. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  27. #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
  28. #define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
  29. #include "juce_audio_processors.h"
  30. #include <juce_gui_extra/juce_gui_extra.h>
  31. //==============================================================================
  32. #if JUCE_MAC
  33. #if JUCE_SUPPORT_CARBON && (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_AU)
  34. #include <Carbon/Carbon.h>
  35. #include <juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h>
  36. #endif
  37. #endif
  38. #if (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3) && JUCE_LINUX
  39. #include <X11/Xlib.h>
  40. #include <X11/Xutil.h>
  41. #include <sys/utsname.h>
  42. #undef KeyPress
  43. #endif
  44. #if ! JUCE_WINDOWS && ! JUCE_MAC && ! JUCE_LINUX
  45. #undef JUCE_PLUGINHOST_VST3
  46. #define JUCE_PLUGINHOST_VST3 0
  47. #endif
  48. #if JUCE_PLUGINHOST_AU && (JUCE_MAC || JUCE_IOS)
  49. #include <AudioUnit/AudioUnit.h>
  50. #endif
  51. //==============================================================================
  52. namespace juce
  53. {
  54. #if JUCE_PLUGINHOST_VST || (JUCE_PLUGINHOST_LADSPA && JUCE_LINUX)
  55. static bool arrayContainsPlugin (const OwnedArray<PluginDescription>& list,
  56. const PluginDescription& desc)
  57. {
  58. for (auto* p : list)
  59. if (p->isDuplicateOf (desc))
  60. return true;
  61. return false;
  62. }
  63. #endif
  64. #if JUCE_MAC || JUCE_IOS
  65. #if JUCE_IOS
  66. #define JUCE_IOS_MAC_VIEW UIView
  67. using ViewComponentBaseClass = UIViewComponent;
  68. #else
  69. #define JUCE_IOS_MAC_VIEW NSView
  70. using ViewComponentBaseClass = NSViewComponent;
  71. #endif
  72. //==============================================================================
  73. struct AutoResizingNSViewComponent : public ViewComponentBaseClass,
  74. private AsyncUpdater
  75. {
  76. void childBoundsChanged (Component*) override { triggerAsyncUpdate(); }
  77. void handleAsyncUpdate() override { resizeToFitView(); }
  78. };
  79. //==============================================================================
  80. struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewComponent,
  81. private Timer
  82. {
  83. AutoResizingNSViewComponentWithParent()
  84. {
  85. JUCE_IOS_MAC_VIEW* v = [[JUCE_IOS_MAC_VIEW alloc] init];
  86. setView (v);
  87. [v release];
  88. startTimer (30);
  89. }
  90. JUCE_IOS_MAC_VIEW* getChildView() const
  91. {
  92. if (JUCE_IOS_MAC_VIEW* parent = (JUCE_IOS_MAC_VIEW*) getView())
  93. if ([[parent subviews] count] > 0)
  94. return [[parent subviews] objectAtIndex: 0];
  95. return nil;
  96. }
  97. void timerCallback() override
  98. {
  99. if (JUCE_IOS_MAC_VIEW* child = getChildView())
  100. {
  101. stopTimer();
  102. setView (child);
  103. }
  104. }
  105. };
  106. #endif
  107. } // namespace juce
  108. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", "-Wcast-align")
  109. #include "format/juce_AudioPluginFormat.cpp"
  110. #include "format/juce_AudioPluginFormatManager.cpp"
  111. #include "format_types/juce_LegacyAudioParameter.cpp"
  112. #include "processors/juce_AudioProcessor.cpp"
  113. #include "processors/juce_AudioPluginInstance.cpp"
  114. #include "processors/juce_AudioProcessorEditor.cpp"
  115. #include "processors/juce_AudioProcessorGraph.cpp"
  116. #include "processors/juce_GenericAudioProcessorEditor.cpp"
  117. #include "processors/juce_PluginDescription.cpp"
  118. #include "format_types/juce_LADSPAPluginFormat.cpp"
  119. #include "format_types/juce_VSTPluginFormat.cpp"
  120. #include "format_types/juce_VST3PluginFormat.cpp"
  121. #include "format_types/juce_AudioUnitPluginFormat.mm"
  122. #include "scanning/juce_KnownPluginList.cpp"
  123. #include "scanning/juce_PluginDirectoryScanner.cpp"
  124. #include "scanning/juce_PluginListComponent.cpp"
  125. #include "processors/juce_AudioProcessorParameterGroup.cpp"
  126. #include "utilities/juce_AudioProcessorParameterWithID.cpp"
  127. #include "utilities/juce_RangedAudioParameter.cpp"
  128. #include "utilities/juce_AudioParameterFloat.cpp"
  129. #include "utilities/juce_AudioParameterInt.cpp"
  130. #include "utilities/juce_AudioParameterBool.cpp"
  131. #include "utilities/juce_AudioParameterChoice.cpp"
  132. #include "utilities/juce_ParameterAttachments.cpp"
  133. #include "utilities/juce_AudioProcessorValueTreeState.cpp"