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.

157 lines
5.2KB

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