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.

150 lines
5.0KB

  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. #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. #include "juce_audio_processors.h"
  24. #include <juce_gui_extra/juce_gui_extra.h>
  25. //==============================================================================
  26. #if JUCE_MAC
  27. #if JUCE_SUPPORT_CARBON && (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_AU)
  28. #include <Carbon/Carbon.h>
  29. #include "../juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h"
  30. #endif
  31. #endif
  32. #if JUCE_PLUGINHOST_VST && JUCE_LINUX
  33. #include <X11/Xlib.h>
  34. #include <X11/Xutil.h>
  35. #undef KeyPress
  36. #endif
  37. #if ! JUCE_WINDOWS && ! JUCE_MAC
  38. #undef JUCE_PLUGINHOST_VST3
  39. #define JUCE_PLUGINHOST_VST3 0
  40. #endif
  41. #if JUCE_PLUGINHOST_AU && (JUCE_MAC || JUCE_IOS)
  42. #include <AudioUnit/AudioUnit.h>
  43. #endif
  44. //==============================================================================
  45. namespace juce
  46. {
  47. static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& list,
  48. const PluginDescription& desc)
  49. {
  50. for (auto* p : list)
  51. if (p->isDuplicateOf (desc))
  52. return true;
  53. return false;
  54. }
  55. #if JUCE_MAC || JUCE_IOS
  56. #if JUCE_IOS
  57. #define JUCE_IOS_MAC_VIEW UIView
  58. using ViewComponentBaseClass = UIViewComponent;
  59. #else
  60. #define JUCE_IOS_MAC_VIEW NSView
  61. using ViewComponentBaseClass = NSViewComponent;
  62. #endif
  63. //==============================================================================
  64. struct AutoResizingNSViewComponent : public ViewComponentBaseClass,
  65. private AsyncUpdater
  66. {
  67. void childBoundsChanged (Component*) override { triggerAsyncUpdate(); }
  68. void handleAsyncUpdate() override { resizeToFitView(); }
  69. };
  70. //==============================================================================
  71. struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewComponent,
  72. private Timer
  73. {
  74. AutoResizingNSViewComponentWithParent()
  75. {
  76. JUCE_IOS_MAC_VIEW* v = [[JUCE_IOS_MAC_VIEW alloc] init];
  77. setView (v);
  78. [v release];
  79. startTimer (30);
  80. }
  81. JUCE_IOS_MAC_VIEW* getChildView() const
  82. {
  83. if (JUCE_IOS_MAC_VIEW* parent = (JUCE_IOS_MAC_VIEW*) getView())
  84. if ([[parent subviews] count] > 0)
  85. return [[parent subviews] objectAtIndex: 0];
  86. return nil;
  87. }
  88. void timerCallback() override
  89. {
  90. if (JUCE_IOS_MAC_VIEW* child = getChildView())
  91. {
  92. stopTimer();
  93. setView (child);
  94. }
  95. }
  96. };
  97. #endif
  98. } // namespace juce
  99. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", "-Wcast-align")
  100. #include "format/juce_AudioPluginFormat.cpp"
  101. #include "format/juce_AudioPluginFormatManager.cpp"
  102. #include "format_types/juce_LegacyAudioParameter.cpp"
  103. #include "processors/juce_AudioProcessor.cpp"
  104. #include "processors/juce_AudioPluginInstance.cpp"
  105. #include "processors/juce_AudioProcessorEditor.cpp"
  106. #include "processors/juce_AudioProcessorGraph.cpp"
  107. #include "processors/juce_GenericAudioProcessorEditor.cpp"
  108. #include "processors/juce_PluginDescription.cpp"
  109. #include "format_types/juce_LADSPAPluginFormat.cpp"
  110. #include "format_types/juce_VSTPluginFormat.cpp"
  111. #include "format_types/juce_VST3PluginFormat.cpp"
  112. #include "format_types/juce_AudioUnitPluginFormat.mm"
  113. #include "scanning/juce_KnownPluginList.cpp"
  114. #include "scanning/juce_PluginDirectoryScanner.cpp"
  115. #include "scanning/juce_PluginListComponent.cpp"
  116. #include "processors/juce_AudioProcessorParameterGroup.cpp"
  117. #include "utilities/juce_AudioProcessorParameterWithID.cpp"
  118. #include "utilities/juce_RangedAudioParameter.cpp"
  119. #include "utilities/juce_AudioParameterFloat.cpp"
  120. #include "utilities/juce_AudioParameterInt.cpp"
  121. #include "utilities/juce_AudioParameterBool.cpp"
  122. #include "utilities/juce_AudioParameterChoice.cpp"
  123. #include "utilities/juce_AudioProcessorValueTreeState.cpp"