| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | ||
| index 54a7cb635..d475d93e2 100644 | ||
| --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | ||
| +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | ||
| @@ -61,7 +61,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996 4100) | ||
| #define PRAGMA_ALIGN_SUPPORTED 1 | ||
| #endif | ||
|
|
||
| -#if ! JUCE_MSVC | ||
| +#if ! JUCE_WINDOWS | ||
| #define __cdecl | ||
| #endif | ||
|
|
||
| diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp | ||
| index 91e82f087..211246aed 100644 | ||
| --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp | ||
| +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp | ||
| @@ -64,9 +64,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4355) | ||
| #ifndef WM_APPCOMMAND | ||
| #define WM_APPCOMMAND 0x0319 | ||
| #endif | ||
| - | ||
| - extern "C" void _fpreset(); | ||
| - extern "C" void _clearfp(); | ||
| #elif ! JUCE_WINDOWS | ||
| static void _fpreset() {} | ||
| static void _clearfp() {} | ||
| diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp | ||
| index 644774631..fed316924 100644 | ||
| --- a/modules/juce_gui_basics/juce_gui_basics.cpp | ||
| +++ b/modules/juce_gui_basics/juce_gui_basics.cpp | ||
| @@ -67,9 +67,12 @@ | ||
| #include <vfw.h> | ||
| #include <commdlg.h> | ||
| #include <commctrl.h> | ||
| - #include <UIAutomation.h> | ||
| #include <sapi.h> | ||
|
|
||
| + #if JUCE_MSVC | ||
| + #include <UIAutomation.h> | ||
| + #endif | ||
| + | ||
| #if JUCE_WEB_BROWSER | ||
| #include <exdisp.h> | ||
| #include <exdispid.h> | ||
| @@ -308,13 +311,15 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE | ||
| #include "native/juce_mac_MouseCursor.mm" | ||
|
|
||
| #elif JUCE_WINDOWS | ||
| - #include "native/accessibility/juce_win32_ComInterfaces.h" | ||
| - #include "native/accessibility/juce_win32_WindowsUIAWrapper.h" | ||
| - #include "native/accessibility/juce_win32_AccessibilityElement.h" | ||
| - #include "native/accessibility/juce_win32_UIAHelpers.h" | ||
| - #include "native/accessibility/juce_win32_UIAProviders.h" | ||
| - #include "native/accessibility/juce_win32_AccessibilityElement.cpp" | ||
| - #include "native/accessibility/juce_win32_Accessibility.cpp" | ||
| + #if JUCE_MSVC | ||
| + #include "native/accessibility/juce_win32_ComInterfaces.h" | ||
| + #include "native/accessibility/juce_win32_WindowsUIAWrapper.h" | ||
| + #include "native/accessibility/juce_win32_AccessibilityElement.h" | ||
| + #include "native/accessibility/juce_win32_UIAHelpers.h" | ||
| + #include "native/accessibility/juce_win32_UIAProviders.h" | ||
| + #include "native/accessibility/juce_win32_AccessibilityElement.cpp" | ||
| + #include "native/accessibility/juce_win32_Accessibility.cpp" | ||
| + #endif | ||
| #include "native/juce_win32_Windowing.cpp" | ||
| #include "native/juce_win32_DragAndDrop.cpp" | ||
| #include "native/juce_win32_FileChooser.cpp" | ||
| diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp | ||
| index 4ffc09d9a..e5886ca31 100644 | ||
| --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp | ||
| +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp | ||
| @@ -1519,8 +1519,10 @@ public: | ||
| // do this first to avoid messages arriving for this window before it's destroyed | ||
| JuceWindowIdentifier::setAsJUCEWindow (hwnd, false); | ||
|
|
||
| + #if JUCE_MSVC | ||
| if (isAccessibilityActive) | ||
| WindowsAccessibility::revokeUIAMapEntriesForWindow (hwnd); | ||
| + #endif | ||
|
|
||
| shadower = nullptr; | ||
| currentTouches.deleteAllTouchesForPeer (this); | ||
| @@ -4052,6 +4054,7 @@ private: | ||
| case WM_GETDLGCODE: | ||
| return DLGC_WANTALLKEYS; | ||
|
|
||
| + #if JUCE_MSVC | ||
| case WM_GETOBJECT: | ||
| { | ||
| if (static_cast<long> (lParam) == WindowsAccessibility::getUiaRootObjectId()) | ||
| @@ -4070,6 +4073,7 @@ private: | ||
|
|
||
| break; | ||
| } | ||
| + #endif | ||
| default: | ||
| break; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| diff --git a/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h b/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h | ||
| index 1a56fcf22..5a433ac82 100644 | ||
| --- a/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h | ||
| +++ b/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h | ||
| @@ -63,7 +63,9 @@ typedef AudioComponentInstance AudioUnit; | ||
| } | ||
| @endcode | ||
| */ | ||
| +#ifndef _VESTIGE_H | ||
| struct AEffect; | ||
| +#endif | ||
|
|
||
| //============================================================================== | ||
| namespace juce |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,304 @@ | ||
| diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp | ||
| index 49c6e390e..6640a8aff 100644 | ||
| --- a/modules/juce_audio_processors/juce_audio_processors.cpp | ||
| +++ b/modules/juce_audio_processors/juce_audio_processors.cpp | ||
| @@ -34,7 +34,9 @@ | ||
|
|
||
| #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 | ||
| #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 | ||
| -#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1 | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1 | ||
| +#endif | ||
| #define JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER 1 | ||
| #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1 | ||
|
|
||
| @@ -49,7 +51,7 @@ | ||
| #endif | ||
| #endif | ||
|
|
||
| -#if (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3) && (JUCE_LINUX || JUCE_BSD) | ||
| +#if (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3) && (JUCE_LINUX || JUCE_BSD) && ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| #include <X11/Xlib.h> | ||
| #include <X11/Xutil.h> | ||
| #include <sys/utsname.h> | ||
| @@ -188,17 +190,21 @@ private: | ||
| #include "format_types/juce_LegacyAudioParameter.cpp" | ||
| #include "processors/juce_AudioProcessor.cpp" | ||
| #include "processors/juce_AudioPluginInstance.cpp" | ||
| -#include "processors/juce_AudioProcessorEditor.cpp" | ||
| #include "processors/juce_AudioProcessorGraph.cpp" | ||
| -#include "processors/juce_GenericAudioProcessorEditor.cpp" | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #include "processors/juce_AudioProcessorEditor.cpp" | ||
| + #include "processors/juce_GenericAudioProcessorEditor.cpp" | ||
| +#endif | ||
| #include "processors/juce_PluginDescription.cpp" | ||
| #include "format_types/juce_LADSPAPluginFormat.cpp" | ||
| #include "format_types/juce_VSTPluginFormat.cpp" | ||
| #include "format_types/juce_VST3PluginFormat.cpp" | ||
| #include "format_types/juce_AudioUnitPluginFormat.mm" | ||
| -#include "scanning/juce_KnownPluginList.cpp" | ||
| -#include "scanning/juce_PluginDirectoryScanner.cpp" | ||
| -#include "scanning/juce_PluginListComponent.cpp" | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #include "scanning/juce_KnownPluginList.cpp" | ||
| + #include "scanning/juce_PluginDirectoryScanner.cpp" | ||
| + #include "scanning/juce_PluginListComponent.cpp" | ||
| +#endif | ||
| #include "processors/juce_AudioProcessorParameterGroup.cpp" | ||
| #include "utilities/juce_AudioProcessorParameterWithID.cpp" | ||
| #include "utilities/juce_RangedAudioParameter.cpp" | ||
| @@ -206,6 +212,13 @@ private: | ||
| #include "utilities/juce_AudioParameterInt.cpp" | ||
| #include "utilities/juce_AudioParameterBool.cpp" | ||
| #include "utilities/juce_AudioParameterChoice.cpp" | ||
| -#include "utilities/juce_ParameterAttachments.cpp" | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #include "utilities/juce_ParameterAttachments.cpp" | ||
| +#endif | ||
| #include "utilities/juce_AudioProcessorValueTreeState.cpp" | ||
| #include "utilities/juce_PluginHostType.cpp" | ||
| + | ||
| +#if JUCE_AUDIOPROCESSOR_NO_GUI | ||
| +// commonly used classes in DSP code | ||
| +namespace juce { Colour::Colour(juce::uint32) noexcept {} } | ||
| +#endif | ||
| diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h | ||
| index 6e6b90e97..25dcf0f06 100644 | ||
| --- a/modules/juce_audio_processors/juce_audio_processors.h | ||
| +++ b/modules/juce_audio_processors/juce_audio_processors.h | ||
| @@ -122,14 +122,18 @@ | ||
| #include "processors/juce_AudioProcessorParameter.h" | ||
| #include "processors/juce_HostedAudioProcessorParameter.h" | ||
| #include "processors/juce_AudioProcessorEditorHostContext.h" | ||
| -#include "processors/juce_AudioProcessorEditor.h" | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #include "processors/juce_AudioProcessorEditor.h" | ||
| +#endif | ||
| #include "processors/juce_AudioProcessorListener.h" | ||
| #include "processors/juce_AudioProcessorParameterGroup.h" | ||
| #include "processors/juce_AudioProcessor.h" | ||
| #include "processors/juce_PluginDescription.h" | ||
| #include "processors/juce_AudioPluginInstance.h" | ||
| #include "processors/juce_AudioProcessorGraph.h" | ||
| -#include "processors/juce_GenericAudioProcessorEditor.h" | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #include "processors/juce_GenericAudioProcessorEditor.h" | ||
| +#endif | ||
| #include "format/juce_AudioPluginFormat.h" | ||
| #include "format/juce_AudioPluginFormatManager.h" | ||
| #include "scanning/juce_KnownPluginList.h" | ||
| @@ -146,6 +150,8 @@ | ||
| #include "utilities/juce_AudioParameterInt.h" | ||
| #include "utilities/juce_AudioParameterBool.h" | ||
| #include "utilities/juce_AudioParameterChoice.h" | ||
| -#include "utilities/juce_ParameterAttachments.h" | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| + #include "utilities/juce_ParameterAttachments.h" | ||
| +#endif | ||
| #include "utilities/juce_AudioProcessorValueTreeState.h" | ||
| #include "utilities/juce_PluginHostType.h" | ||
| diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp | ||
| index fbf91cb84..8c84aec59 100644 | ||
| --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp | ||
| +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp | ||
| @@ -50,12 +50,14 @@ AudioProcessor::AudioProcessor (const BusesProperties& ioConfig) | ||
|
|
||
| AudioProcessor::~AudioProcessor() | ||
| { | ||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| { | ||
| const ScopedLock sl (activeEditorLock); | ||
|
|
||
| // ooh, nasty - the editor should have been deleted before its AudioProcessor. | ||
| jassert (activeEditor == nullptr); | ||
| } | ||
| + #endif | ||
|
|
||
| #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING | ||
| // This will fail if you've called beginParameterChangeGesture() for one | ||
| @@ -865,6 +867,7 @@ void AudioProcessor::audioIOChanged (bool busNumberChanged, bool channelNumChang | ||
| processorLayoutsChanged(); | ||
| } | ||
|
|
||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| //============================================================================== | ||
| void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) noexcept | ||
| { | ||
| @@ -901,6 +904,7 @@ AudioProcessorEditor* AudioProcessor::createEditorIfNeeded() | ||
|
|
||
| return ed; | ||
| } | ||
| +#endif | ||
|
|
||
| //============================================================================== | ||
| void AudioProcessor::getCurrentProgramStateInformation (juce::MemoryBlock& destData) | ||
| diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h | ||
| index 1062b14f9..120e5571e 100644 | ||
| --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h | ||
| +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h | ||
| @@ -928,6 +928,7 @@ public: | ||
| */ | ||
| virtual void setNonRealtime (bool isNonRealtime) noexcept; | ||
|
|
||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| //============================================================================== | ||
| /** Creates the processor's GUI. | ||
|
|
||
| @@ -977,6 +978,7 @@ public: | ||
| This may call createEditor() internally to create the component. | ||
| */ | ||
| AudioProcessorEditor* createEditorIfNeeded(); | ||
| + #endif | ||
|
|
||
| //============================================================================== | ||
| /** Returns the default number of steps for a parameter. | ||
| @@ -1193,9 +1195,11 @@ public: | ||
|
|
||
| virtual CurveData getResponseCurve (CurveData::Type /*curveType*/) const { return {}; } | ||
|
|
||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| //============================================================================== | ||
| /** Not for public use - this is called before deleting an editor component. */ | ||
| void editorBeingDeleted (AudioProcessorEditor*) noexcept; | ||
| + #endif | ||
|
|
||
| /** Flags to indicate the type of plugin context in which a processor is being used. */ | ||
| enum WrapperType | ||
| @@ -1226,7 +1230,9 @@ public: | ||
| struct TrackProperties | ||
| { | ||
| String name; // The name of the track - this will be empty if the track name is not known | ||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| Colour colour; // The colour of the track - this will be transparentBlack if the colour is not known | ||
| + #endif | ||
|
|
||
| // other properties may be added in the future | ||
| }; | ||
| @@ -1469,7 +1475,9 @@ private: | ||
|
|
||
| //============================================================================== | ||
| Array<AudioProcessorListener*> listeners; | ||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| Component::SafePointer<AudioProcessorEditor> activeEditor; | ||
| + #endif | ||
| double currentSampleRate = 0; | ||
| int blockSize = 0, latencySamples = 0; | ||
| bool suspended = false; | ||
| diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | ||
| index f9999c802..2e114a4ad 100644 | ||
| --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | ||
| +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | ||
| @@ -1557,8 +1557,10 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::producesMidi() const | ||
| bool AudioProcessorGraph::AudioGraphIOProcessor::isInput() const noexcept { return type == audioInputNode || type == midiInputNode; } | ||
| bool AudioProcessorGraph::AudioGraphIOProcessor::isOutput() const noexcept { return type == audioOutputNode || type == midiOutputNode; } | ||
|
|
||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const { return false; } | ||
| AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; } | ||
| +#endif | ||
|
|
||
| int AudioProcessorGraph::AudioGraphIOProcessor::getNumPrograms() { return 0; } | ||
| int AudioProcessorGraph::AudioGraphIOProcessor::getCurrentProgram() { return 0; } | ||
| diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | ||
| index 7b6ab003a..795154b7e 100644 | ||
| --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | ||
| +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | ||
| @@ -357,8 +357,10 @@ public: | ||
| bool acceptsMidi() const override; | ||
| bool producesMidi() const override; | ||
|
|
||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| bool hasEditor() const override; | ||
| AudioProcessorEditor* createEditor() override; | ||
| + #endif | ||
|
|
||
| int getNumPrograms() override; | ||
| int getCurrentProgram() override; | ||
| @@ -394,8 +396,10 @@ public: | ||
| bool acceptsMidi() const override; | ||
| bool producesMidi() const override; | ||
|
|
||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| bool hasEditor() const override { return false; } | ||
| AudioProcessorEditor* createEditor() override { return nullptr; } | ||
| + #endif | ||
| int getNumPrograms() override { return 0; } | ||
| int getCurrentProgram() override { return 0; } | ||
| void setCurrentProgram (int) override { } | ||
| diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp | ||
| index bf4b55026..a131040a7 100644 | ||
| --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp | ||
| +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp | ||
| @@ -484,6 +484,7 @@ void AudioProcessorValueTreeState::timerCallback() | ||
| } | ||
|
|
||
| //============================================================================== | ||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| template <typename Attachment, typename Control> | ||
| std::unique_ptr<Attachment> makeAttachment (const AudioProcessorValueTreeState& stateToUse, | ||
| const String& parameterID, | ||
| @@ -516,6 +517,7 @@ AudioProcessorValueTreeState::ButtonAttachment::ButtonAttachment (AudioProcessor | ||
| : attachment (makeAttachment<ButtonParameterAttachment> (stateToUse, parameterID, button)) | ||
| { | ||
| } | ||
| +#endif | ||
|
|
||
| //============================================================================== | ||
| //============================================================================== | ||
| diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h | ||
| index e1125680f..fdd1b6c98 100644 | ||
| --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h | ||
| +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h | ||
| @@ -431,6 +431,7 @@ public: | ||
| friend class AudioProcessorValueTreeState::ParameterAdapter; | ||
| }; | ||
|
|
||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| //============================================================================== | ||
| /** An object of this class maintains a connection between a Slider and a parameter | ||
| in an AudioProcessorValueTreeState. | ||
| @@ -498,6 +499,7 @@ public: | ||
| std::unique_ptr<ButtonParameterAttachment> attachment; | ||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment) | ||
| }; | ||
| + #endif | ||
|
|
||
| private: | ||
| //============================================================================== | ||
| diff --git a/modules/juce_audio_processors/utilities/juce_PluginHostType.cpp b/modules/juce_audio_processors/utilities/juce_PluginHostType.cpp | ||
| index 6f38cb8ca..6d40cbdd8 100644 | ||
| --- a/modules/juce_audio_processors/utilities/juce_PluginHostType.cpp | ||
| +++ b/modules/juce_audio_processors/utilities/juce_PluginHostType.cpp | ||
| @@ -70,6 +70,7 @@ bool PluginHostType::isInAAXAudioSuite (AudioProcessor& processor) | ||
| return false; | ||
| } | ||
|
|
||
| +#if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| Image PluginHostType::getHostIcon (int size) const | ||
| { | ||
| ignoreUnused (size); | ||
| @@ -86,6 +87,7 @@ Image PluginHostType::getHostIcon (int size) const | ||
|
|
||
| return Image(); | ||
| } | ||
| +#endif | ||
|
|
||
| const char* PluginHostType::getHostDescription() const noexcept | ||
| { | ||
| diff --git a/modules/juce_audio_processors/utilities/juce_PluginHostType.h b/modules/juce_audio_processors/utilities/juce_PluginHostType.h | ||
| index a11bc52d5..2e2acb3b2 100644 | ||
| --- a/modules/juce_audio_processors/utilities/juce_PluginHostType.h | ||
| +++ b/modules/juce_audio_processors/utilities/juce_PluginHostType.h | ||
| @@ -207,8 +207,10 @@ public: | ||
| bool isInterAppAudioConnected() const; | ||
| /** Switches to the host application when Inter-App Audio is used on iOS. */ | ||
| void switchToHostApplication() const; | ||
| + #if ! JUCE_AUDIOPROCESSOR_NO_GUI | ||
| /** Gets the host app's icon when Inter-App Audio is used on iOS. */ | ||
| Image getHostIcon (int size) const; | ||
| + #endif | ||
|
|
||
| //============================================================================== | ||
| /** Returns the complete absolute path of the host application executable. */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| diff --git a/modules/juce_opengl/native/juce_OpenGLExtensions.h b/modules/juce_opengl/native/juce_OpenGLExtensions.h | ||
| index 4f75ae5b7..bacc4b266 100644 | ||
| --- a/modules/juce_opengl/native/juce_OpenGLExtensions.h | ||
| +++ b/modules/juce_opengl/native/juce_OpenGLExtensions.h | ||
| @@ -83,7 +83,14 @@ namespace juce | ||
| X (glCheckFramebufferStatus) \ | ||
| X (glFramebufferTexture2D) \ | ||
| X (glFramebufferRenderbuffer) \ | ||
| - X (glGetFramebufferAttachmentParameteriv) | ||
| + X (glGetFramebufferAttachmentParameteriv) \ | ||
| + X (glTransformFeedbackVaryings) \ | ||
| + X (glBeginTransformFeedback) \ | ||
| + X (glEndTransformFeedback) \ | ||
| + X (glBindBufferBase) \ | ||
| + X (glMapBufferRange) \ | ||
| + X (glUnmapBuffer) | ||
| + | ||
|
|
||
| /** @internal This macro contains a list of GL extension functions that need to be dynamically loaded on Windows/Linux. | ||
| @see OpenGLExtensionFunctions |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
|  | ||
|
|
||
| JUCE is an open-source cross-platform C++ application framework for creating high quality | ||
| desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins. | ||
| JUCE can be easily integrated with existing projects via CMake, or can be used as a project | ||
| generation tool via the [Projucer](https://juce.com/discover/projucer), which supports | ||
| exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio, Code::Blocks | ||
| and Linux Makefiles as well as containing a source code editor. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| The JUCE repository contains a [master](https://github.com/juce-framework/JUCE/tree/master) | ||
| and [develop](https://github.com/juce-framework/JUCE/tree/develop) branch. The develop branch | ||
| contains the latest bugfixes and features and is periodically merged into the master | ||
| branch in stable [tagged releases](https://github.com/juce-framework/JUCE/releases) | ||
| (the latest release containing pre-built binaries can be also downloaded from the | ||
| [JUCE website](https://juce.com/get-juce)). | ||
|
|
||
| JUCE projects can be managed with either the Projucer (JUCE's own project-configuration | ||
| tool) or with CMake. | ||
|
|
||
| ### The Projucer | ||
|
|
||
| The repository doesn't contain a pre-built Projucer so you will need to build it | ||
| for your platform - Xcode, Visual Studio and Linux Makefile projects are located in | ||
| [extras/Projucer/Builds](/extras/Projucer/Builds) | ||
| (the minimum system requirements are listed in the __System Requirements__ section below). | ||
| The Projucer can then be used to create new JUCE projects, view tutorials and run examples. | ||
| It is also possible to include the JUCE modules source code in an existing project directly, | ||
| or build them into a static or dynamic library which can be linked into a project. | ||
|
|
||
| For further help getting started, please refer to the JUCE | ||
| [documentation](https://juce.com/learn/documentation) and | ||
| [tutorials](https://juce.com/learn/tutorials). | ||
|
|
||
| ### CMake | ||
|
|
||
| Version 3.15 or higher is required. To use CMake, you will need to install it, | ||
| either from your system package manager or from the [official download | ||
| page](https://cmake.org/download/). For comprehensive documentation on JUCE's | ||
| CMake API, see the [JUCE CMake documentation](/docs/CMake%20API.md). For | ||
| examples which may be useful as starting points for new CMake projects, see the | ||
| [CMake examples directory](/examples/CMake). | ||
|
|
||
| #### Building Examples | ||
|
|
||
| To use CMake to build the examples and extras bundled with JUCE, simply clone | ||
| JUCE and then run the following commands, replacing "DemoRunner" with the name | ||
| of the target you wish to build. | ||
|
|
||
| cd /path/to/JUCE | ||
| cmake . -B cmake-build -DJUCE_BUILD_EXAMPLES=ON -DJUCE_BUILD_EXTRAS=ON | ||
| cmake --build cmake-build --target DemoRunner | ||
|
|
||
| ## Minimum System Requirements | ||
|
|
||
| #### Building JUCE Projects | ||
|
|
||
| - __macOS/iOS__: Xcode 9.2 (macOS 10.12.6) | ||
| - __Windows__: Windows 8.1 and Visual Studio 2015 Update 3 64-bit | ||
| - __Linux__: g++ 5.0 or Clang 3.4 (for a full list of dependencies, see | ||
| [here](/docs/Linux%20Dependencies.md)). | ||
| - __Android__: Android Studio on Windows, macOS or Linux | ||
|
|
||
| #### Deployment Targets | ||
|
|
||
| - __macOS__: macOS 10.7 | ||
| - __Windows__: Windows Vista | ||
| - __Linux__: Mainstream Linux distributions | ||
| - __iOS__: iOS 9.0 | ||
| - __Android__: Jelly Bean (API 16) | ||
|
|
||
| ## Contributing | ||
|
|
||
| Please see our [contribution guidelines](.github/contributing.md). | ||
|
|
||
| ## License | ||
|
|
||
| The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_core and juce_events) | ||
| are permissively licensed under the terms of the | ||
| [ISC license](http://www.isc.org/downloads/software-support-policy/isc-license/). | ||
| Other modules are covered by a | ||
| [GPL/Commercial license](https://www.gnu.org/licenses/gpl-3.0.en.html). | ||
|
|
||
| There are multiple commercial licensing tiers for JUCE, with different terms for each: | ||
| - JUCE Personal (developers or startup businesses with revenue under 50K USD) - free | ||
| - JUCE Indie (small businesses with revenue under 500K USD) - $40/month | ||
| - JUCE Pro (no revenue limit) - $130/month | ||
| - JUCE Educational (no revenue limit) - free for bona fide educational institutes | ||
|
|
||
| For full terms see [LICENSE.md](LICENSE.md). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,276 @@ | ||
| /* | ||
| ============================================================================== | ||
| This file is part of the JUCE library. | ||
| Copyright (c) 2020 - Raw Material Software Limited | ||
| JUCE is an open source library subject to commercial or open-source | ||
| licensing. | ||
| The code included in this file is provided under the terms of the ISC license | ||
| http://www.isc.org/downloads/software-support-policy/isc-license. Permission | ||
| To use, copy, modify, and/or distribute this software for any purpose with or | ||
| without fee is hereby granted provided that the above copyright notice and | ||
| this permission notice appear in all copies. | ||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | ||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | ||
| DISCLAIMED. | ||
| ============================================================================== | ||
| */ | ||
|
|
||
| namespace juce | ||
| { | ||
|
|
||
| //============================================================================== | ||
| /** | ||
| A subclass of AudioPlayHead can supply information about the position and | ||
| status of a moving play head during audio playback. | ||
| One of these can be supplied to an AudioProcessor object so that it can find | ||
| out about the position of the audio that it is rendering. | ||
| @see AudioProcessor::setPlayHead, AudioProcessor::getPlayHead | ||
| @tags{Audio} | ||
| */ | ||
| class JUCE_API AudioPlayHead | ||
| { | ||
| protected: | ||
| //============================================================================== | ||
| AudioPlayHead() = default; | ||
|
|
||
| public: | ||
| virtual ~AudioPlayHead() = default; | ||
|
|
||
| //============================================================================== | ||
| /** Frame rate types. */ | ||
| enum FrameRateType | ||
| { | ||
| fps23976 = 0, | ||
| fps24 = 1, | ||
| fps25 = 2, | ||
| fps2997 = 3, | ||
| fps30 = 4, | ||
| fps2997drop = 5, | ||
| fps30drop = 6, | ||
| fps60 = 7, | ||
| fps60drop = 8, | ||
| fpsUnknown = 99 | ||
| }; | ||
|
|
||
| /** More descriptive frame rate type. */ | ||
| class JUCE_API FrameRate | ||
| { | ||
| public: | ||
| /** Creates a frame rate with a base rate of 0. */ | ||
| FrameRate() = default; | ||
|
|
||
| /** Creates a FrameRate instance from a FrameRateType. */ | ||
| FrameRate (FrameRateType type) : FrameRate (fromType (type)) {} | ||
|
|
||
| /** Gets the FrameRateType that matches the state of this FrameRate. | ||
| Returns fpsUnknown if this FrameRate cannot be represented by any of the | ||
| other enum fields. | ||
| */ | ||
| FrameRateType getType() const | ||
| { | ||
| switch (base) | ||
| { | ||
| case 24: return pulldown ? fps23976 : fps24; | ||
| case 25: return fps25; | ||
| case 30: return pulldown ? (drop ? fps2997drop : fps2997) | ||
| : (drop ? fps30drop : fps30); | ||
| case 60: return drop ? fps60drop : fps60; | ||
| } | ||
|
|
||
| return fpsUnknown; | ||
| } | ||
|
|
||
| /** Returns the plain rate, without taking pulldown into account. */ | ||
| int getBaseRate() const { return base; } | ||
|
|
||
| /** Returns true if drop-frame timecode is in use. */ | ||
| bool isDrop() const { return drop; } | ||
|
|
||
| /** Returns true if the effective framerate is actually equal to the base rate divided by 1.001 */ | ||
| bool isPullDown() const { return pulldown; } | ||
|
|
||
| /** Returns the actual rate described by this object, taking pulldown into account. */ | ||
| double getEffectiveRate() const { return pulldown ? (double) base / 1.001 : (double) base; } | ||
|
|
||
| /** Returns a copy of this object with the specified base rate. */ | ||
| JUCE_NODISCARD FrameRate withBaseRate (int x) const { return with (&FrameRate::base, x); } | ||
|
|
||
| /** Returns a copy of this object with drop frames enabled or disabled, as specified. */ | ||
| JUCE_NODISCARD FrameRate withDrop (bool x = true) const { return with (&FrameRate::drop, x); } | ||
|
|
||
| /** Returns a copy of this object with pulldown enabled or disabled, as specified. */ | ||
| JUCE_NODISCARD FrameRate withPullDown (bool x = true) const { return with (&FrameRate::pulldown, x); } | ||
|
|
||
| /** Returns true if this instance is equal to other. */ | ||
| bool operator== (const FrameRate& other) const | ||
| { | ||
| const auto tie = [] (const FrameRate& x) { return std::tie (x.base, x.drop, x.pulldown); }; | ||
| return tie (*this) == tie (other); | ||
| } | ||
|
|
||
| /** Returns true if this instance is not equal to other. */ | ||
| bool operator!= (const FrameRate& other) const { return ! (*this == other); } | ||
|
|
||
| private: | ||
| static FrameRate fromType (FrameRateType type) | ||
| { | ||
| switch (type) | ||
| { | ||
| case fps23976: return FrameRate().withBaseRate (24).withPullDown(); | ||
| case fps24: return FrameRate().withBaseRate (24); | ||
| case fps25: return FrameRate().withBaseRate (25); | ||
| case fps2997: return FrameRate().withBaseRate (30).withPullDown(); | ||
| case fps30: return FrameRate().withBaseRate (30); | ||
| case fps2997drop: return FrameRate().withBaseRate (30).withDrop().withPullDown(); | ||
| case fps30drop: return FrameRate().withBaseRate (30).withDrop(); | ||
| case fps60: return FrameRate().withBaseRate (60); | ||
| case fps60drop: return FrameRate().withBaseRate (60).withDrop(); | ||
| case fpsUnknown: break; | ||
| } | ||
|
|
||
| return {}; | ||
| } | ||
|
|
||
| template <typename Member, typename Value> | ||
| FrameRate with (Member&& member, Value&& value) const | ||
| { | ||
| auto copy = *this; | ||
| copy.*member = std::forward<Value> (value); | ||
| return copy; | ||
| } | ||
|
|
||
| int base = 0; | ||
| bool drop = false, pulldown = false; | ||
| }; | ||
|
|
||
| //============================================================================== | ||
| /** This structure is filled-in by the AudioPlayHead::getCurrentPosition() method. | ||
| */ | ||
| struct JUCE_API CurrentPositionInfo | ||
| { | ||
| /** The tempo in BPM */ | ||
| double bpm = 120.0; | ||
|
|
||
| /** Time signature numerator, e.g. the 3 of a 3/4 time sig */ | ||
| int timeSigNumerator = 4; | ||
| /** Time signature denominator, e.g. the 4 of a 3/4 time sig */ | ||
| int timeSigDenominator = 4; | ||
|
|
||
| /** The current play position, in samples from the start of the timeline. */ | ||
| int64 timeInSamples = 0; | ||
| /** The current play position, in seconds from the start of the timeline. */ | ||
| double timeInSeconds = 0; | ||
|
|
||
| /** For timecode, the position of the start of the timeline, in seconds from 00:00:00:00. */ | ||
| double editOriginTime = 0; | ||
|
|
||
| /** The current play position, in units of quarter-notes. */ | ||
| double ppqPosition = 0; | ||
|
|
||
| /** The position of the start of the last bar, in units of quarter-notes. | ||
| This is the time from the start of the timeline to the start of the current | ||
| bar, in ppq units. | ||
| Note - this value may be unavailable on some hosts, e.g. Pro-Tools. If | ||
| it's not available, the value will be 0. | ||
| */ | ||
| double ppqPositionOfLastBarStart = 0; | ||
|
|
||
| /** The video frame rate, if applicable. */ | ||
| FrameRate frameRate = FrameRateType::fps23976; | ||
|
|
||
| /** True if the transport is currently playing. */ | ||
| bool isPlaying = false; | ||
|
|
||
| /** True if the transport is currently recording. | ||
| (When isRecording is true, then isPlaying will also be true). | ||
| */ | ||
| bool isRecording = false; | ||
|
|
||
| /** The current cycle start position in units of quarter-notes. | ||
| Note that not all hosts or plugin formats may provide this value. | ||
| @see isLooping | ||
| */ | ||
| double ppqLoopStart = 0; | ||
|
|
||
| /** The current cycle end position in units of quarter-notes. | ||
| Note that not all hosts or plugin formats may provide this value. | ||
| @see isLooping | ||
| */ | ||
| double ppqLoopEnd = 0; | ||
|
|
||
| /** True if the transport is currently looping. */ | ||
| bool isLooping = false; | ||
|
|
||
| //============================================================================== | ||
| bool operator== (const CurrentPositionInfo& other) const noexcept | ||
| { | ||
| const auto tie = [] (const CurrentPositionInfo& i) | ||
| { | ||
| return std::tie (i.timeInSamples, | ||
| i.ppqPosition, | ||
| i.editOriginTime, | ||
| i.ppqPositionOfLastBarStart, | ||
| i.frameRate, | ||
| i.isPlaying, | ||
| i.isRecording, | ||
| i.bpm, | ||
| i.timeSigNumerator, | ||
| i.timeSigDenominator, | ||
| i.ppqLoopStart, | ||
| i.ppqLoopEnd, | ||
| i.isLooping); | ||
| }; | ||
|
|
||
| return tie (*this) == tie (other); | ||
| } | ||
|
|
||
| bool operator!= (const CurrentPositionInfo& other) const noexcept | ||
| { | ||
| return ! operator== (other); | ||
| } | ||
|
|
||
| void resetToDefault() | ||
| { | ||
| *this = CurrentPositionInfo{}; | ||
| } | ||
| }; | ||
|
|
||
| //============================================================================== | ||
| /** Fills-in the given structure with details about the transport's | ||
| position at the start of the current processing block. If this method returns | ||
| false then the current play head position is not available and the given | ||
| structure will be undefined. | ||
| You can ONLY call this from your processBlock() method! Calling it at other | ||
| times will produce undefined behaviour, as the host may not have any context | ||
| in which a time would make sense, and some hosts will almost certainly have | ||
| multithreading issues if it's not called on the audio thread. | ||
| */ | ||
| virtual bool getCurrentPosition (CurrentPositionInfo& result) = 0; | ||
|
|
||
| /** Returns true if this object can control the transport. */ | ||
| virtual bool canControlTransport() { return false; } | ||
|
|
||
| /** Starts or stops the audio. */ | ||
| virtual void transportPlay (bool shouldStartPlaying) { ignoreUnused (shouldStartPlaying); } | ||
|
|
||
| /** Starts or stops recording the audio. */ | ||
| virtual void transportRecord (bool shouldStartRecording) { ignoreUnused (shouldStartRecording); } | ||
|
|
||
| /** Rewinds the audio. */ | ||
| virtual void transportRewind() {} | ||
| }; | ||
|
|
||
| } // namespace juce |