Browse Source

Add juce7 patches

Signed-off-by: falkTX <falktx@falktx.com>
roth-air
falkTX 2 years ago
parent
commit
452839232c
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
22 changed files with 4644 additions and 0 deletions
  1. +14
    -0
      libs/juce7/patches/01_audiodevicemanager-prefer-jack-over-alsa.patch
  2. +80
    -0
      libs/juce7/patches/02_flac-assume-sse-present.patch
  3. +13
    -0
      libs/juce7/patches/03_fix-midi-message-constness.patch
  4. +2780
    -0
      libs/juce7/patches/04_vst2-interface.patch
  5. +538
    -0
      libs/juce7/patches/04_vst2-interface_file.patch
  6. +100
    -0
      libs/juce7/patches/05_mingw-fixes.patch
  7. +30
    -0
      libs/juce7/patches/06_fix-coregraphics-rendering-macro-usage.patch
  8. +13
    -0
      libs/juce7/patches/07_allow-local-ladspa.patch
  9. +127
    -0
      libs/juce7/patches/08_remove-splashscreen.patch
  10. +46
    -0
      libs/juce7/patches/09_proper-getExecutableFile.patch
  11. +118
    -0
      libs/juce7/patches/10_fix-fork-exec-usage.patch
  12. +61
    -0
      libs/juce7/patches/11_childprocess-getPID.patch
  13. +39
    -0
      libs/juce7/patches/12_linux-filechooser-needs-modal-loops.patch
  14. +109
    -0
      libs/juce7/patches/13_dialogwindow-allow-native-titlebar.patch
  15. +23
    -0
      libs/juce7/patches/14_fix-x11-temporary-windows.patch
  16. +14
    -0
      libs/juce7/patches/15_fix-usage-with-vestige.patch
  17. +14
    -0
      libs/juce7/patches/17_allow-vst2-without-audio.patch
  18. +13
    -0
      libs/juce7/patches/18_dynamic-vst2-plugin-name.patch
  19. +38
    -0
      libs/juce7/patches/19_projucer-gpl-mode.patch
  20. +420
    -0
      libs/juce7/patches/21_audioprocessor-no-gui.patch
  21. +34
    -0
      libs/juce7/patches/22_mingw-filechooser-no-vista.patch
  22. +20
    -0
      libs/juce7/patches/24_extra-gl-functions.patch

+ 14
- 0
libs/juce7/patches/01_audiodevicemanager-prefer-jack-over-alsa.patch View File

@@ -0,0 +1,14 @@
diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
index fa8a59c2d..9bc1d72e9 100644
--- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
+++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
@@ -237,8 +237,8 @@ void AudioDeviceManager::createAudioDeviceTypes (OwnedArray<AudioIODeviceType>&
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_CoreAudio());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_iOSAudio());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_Bela());
- addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_ALSA());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_JACK());
+ addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_ALSA());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_Oboe());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_OpenSLES());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_Android());

+ 80
- 0
libs/juce7/patches/02_flac-assume-sse-present.patch View File

@@ -0,0 +1,80 @@
diff --git a/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c b/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c
index 4eac42e95..74d120e7d 100644
--- a/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c
+++ b/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c
@@ -240,42 +240,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
disable_sse(info);
# endif
#elif defined(__linux__)
- int sse = 0;
- struct sigaction sigill_save;
- struct sigaction sigill_sse;
- sigill_sse.sa_sigaction = sigill_handler_sse_os;
- #ifdef __ANDROID__
- sigemptyset (&sigill_sse.sa_mask);
- #else
- __sigemptyset(&sigill_sse.sa_mask);
- #endif
- sigill_sse.sa_flags = SA_SIGINFO | SA_RESETHAND; /* SA_RESETHAND just in case our SIGILL return jump breaks, so we don't get stuck in a loop */
- if(0 == sigaction(SIGILL, &sigill_sse, &sigill_save))
- {
- /* http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html */
- /* see sigill_handler_sse_os() for an explanation of the following: */
- asm volatile (
- "xorps %%xmm0,%%xmm0\n\t" /* will cause SIGILL if unsupported by OS */
- "incl %0\n\t" /* SIGILL handler will jump over this */
- /* landing zone */
- "nop\n\t" /* SIGILL jump lands here if "inc" is 9 bytes */
- "nop\n\t"
- "nop\n\t"
- "nop\n\t"
- "nop\n\t"
- "nop\n\t"
- "nop\n\t" /* SIGILL jump lands here if "inc" is 3 bytes (expected) */
- "nop\n\t"
- "nop" /* SIGILL jump lands here if "inc" is 1 byte */
- : "=r"(sse)
- : "0"(sse)
- );
-
- sigaction(SIGILL, &sigill_save, NULL);
- }
-
- if(!sse)
- disable_sse(info);
+ int sse = 1;
#elif defined(_MSC_VER)
__try {
__asm {
@@ -287,30 +252,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
disable_sse(info);
}
#elif defined(__GNUC__) /* MinGW goes here */
- int sse = 0;
- /* Based on the idea described in Agner Fog's manual "Optimizing subroutines in assembly language" */
- /* In theory, not guaranteed to detect lack of OS SSE support on some future Intel CPUs, but in practice works (see the aforementioned manual) */
- if (ia32_fxsr) {
- struct {
- FLAC__uint32 buff[128];
- } __attribute__((aligned(16))) fxsr;
- FLAC__uint32 old_val, new_val;
-
- asm volatile ("fxsave %0" : "=m" (fxsr) : "m" (fxsr));
- old_val = fxsr.buff[50];
- fxsr.buff[50] ^= 0x0013c0de; /* change value in the buffer */
- asm volatile ("fxrstor %0" : "=m" (fxsr) : "m" (fxsr)); /* try to change SSE register */
- fxsr.buff[50] = old_val; /* restore old value in the buffer */
- asm volatile ("fxsave %0 " : "=m" (fxsr) : "m" (fxsr)); /* old value will be overwritten if SSE register was changed */
- new_val = fxsr.buff[50]; /* == old_val if FXRSTOR didn't change SSE register and (old_val ^ 0x0013c0de) otherwise */
- fxsr.buff[50] = old_val; /* again restore old value in the buffer */
- asm volatile ("fxrstor %0" : "=m" (fxsr) : "m" (fxsr)); /* restore old values of registers */
-
- if ((old_val^new_val) == 0x0013c0de)
- sse = 1;
- }
- if(!sse)
- disable_sse(info);
+ int sse = 1;
#else
/* no way to test, disable to be safe */
disable_sse(info);

+ 13
- 0
libs/juce7/patches/03_fix-midi-message-constness.patch View File

@@ -0,0 +1,13 @@
diff --git a/modules/juce_audio_basics/midi/juce_MidiMessage.h b/modules/juce_audio_basics/midi/juce_MidiMessage.h
index 5241d7948..c63b965bc 100644
--- a/modules/juce_audio_basics/midi/juce_MidiMessage.h
+++ b/modules/juce_audio_basics/midi/juce_MidiMessage.h
@@ -979,7 +979,7 @@ private:
#endif
inline bool isHeapAllocated() const noexcept { return size > (int) sizeof (packedData); }
- inline uint8* getData() const noexcept { return isHeapAllocated() ? packedData.allocatedData : (uint8*) packedData.asBytes; }
+ inline uint8* getData() const noexcept { return isHeapAllocated() ? packedData.allocatedData : const_cast<uint8*>(packedData.asBytes); }
uint8* allocateSpace (int);
};

+ 2780
- 0
libs/juce7/patches/04_vst2-interface.patch
File diff suppressed because it is too large
View File


+ 538
- 0
libs/juce7/patches/04_vst2-interface_file.patch View File

@@ -0,0 +1,538 @@
diff --git a/modules/juce_audio_processors/format_types/juce_VSTInterface.h b/modules/juce_audio_processors/format_types/juce_VSTInterface.h
new file mode 100644
index 000000000..58179be1a
--- /dev/null
+++ b/modules/juce_audio_processors/format_types/juce_VSTInterface.h
@@ -0,0 +1,532 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library.
+ Copyright (c) 2017 - ROLI Ltd.
+
+ JUCE is an open source library subject to commercial or open-source
+ licensing.
+
+ By using JUCE, you agree to the terms of both the JUCE 5 End-User License
+ Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
+ 27th April 2017).
+
+ End User License Agreement: www.juce.com/juce-5-licence
+ Privacy Policy: www.juce.com/juce-5-privacy-policy
+
+ Or: You may also use this code under the terms of the GPL v3 (see
+ www.gnu.org/licenses).
+
+ JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
+ EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
+ DISCLAIMED.
+
+ ==============================================================================
+*/
+
+#ifndef JUCE_VSTINTERFACE_H_INCLUDED
+#define JUCE_VSTINTERFACE_H_INCLUDED
+
+using namespace juce;
+
+#if JUCE_MSVC
+ #define VSTINTERFACECALL __cdecl
+ #pragma pack(push)
+ #pragma pack(8)
+#elif JUCE_MAC || JUCE_IOS
+ #define VSTINTERFACECALL
+ #if JUCE_64BIT
+ #pragma options align=power
+ #else
+ #pragma options align=mac68k
+ #endif
+#else
+ #define VSTINTERFACECALL
+ #pragma pack(push, 8)
+#endif
+
+const int32 juceVstInterfaceVersion = 2400;
+const int32 juceVstInterfaceIdentifier = 0x56737450; // The "magic" identifier in the SDK is 'VstP'.
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstEffectInterface
+{
+ int32 interfaceIdentifier;
+ pointer_sized_int (VSTINTERFACECALL* dispatchFunction) (VstEffectInterface*, int32 op, int32 index, pointer_sized_int value, void* ptr, float opt);
+ void (VSTINTERFACECALL* processAudioFunction) (VstEffectInterface*, float** inputs, float** outputs, int32 numSamples);
+ void (VSTINTERFACECALL* setParameterValueFunction) (VstEffectInterface*, int32 parameterIndex, float value);
+ float (VSTINTERFACECALL* getParameterValueFunction) (VstEffectInterface*, int32 parameterIndex);
+ int32 numPrograms;
+ int32 numParameters;
+ int32 numInputChannels;
+ int32 numOutputChannels;
+ int32 flags;
+ pointer_sized_int hostSpace1;
+ pointer_sized_int hostSpace2;
+ int32 latency;
+ int32 deprecated1;
+ int32 deprecated2;
+ float deprecated3;
+ void* effectPointer;
+ void* userPointer;
+ int32 plugInIdentifier;
+ int32 plugInVersion;
+ void (VSTINTERFACECALL* processAudioInplaceFunction) (VstEffectInterface*, float** inputs, float** outputs, int32 numSamples);
+ void (VSTINTERFACECALL* processDoubleAudioInplaceFunction) (VstEffectInterface*, double** inputs, double** outputs, int32 numSamples);
+ char emptySpace[56];
+};
+
+typedef pointer_sized_int (VSTINTERFACECALL* VstHostCallback) (VstEffectInterface*, int32 op, int32 index, pointer_sized_int value, void* ptr, float opt);
+
+enum VstEffectInterfaceFlags
+{
+ vstEffectFlagHasEditor = 1,
+ vstEffectFlagInplaceAudio = 16,
+ vstEffectFlagDataInChunks = 32,
+ vstEffectFlagIsSynth = 256,
+ vstEffectFlagInplaceDoubleAudio = 4096
+};
+
+//==============================================================================
+enum VstHostToPlugInOpcodes
+{
+ plugInOpcodeOpen,
+ plugInOpcodeClose,
+ plugInOpcodeSetCurrentProgram,
+ plugInOpcodeGetCurrentProgram,
+ plugInOpcodeSetCurrentProgramName,
+ plugInOpcodeGetCurrentProgramName,
+ plugInOpcodeGetParameterLabel,
+ plugInOpcodeGetParameterText,
+ plugInOpcodeGetParameterName,
+ plugInOpcodeSetSampleRate = plugInOpcodeGetParameterName + 2,
+ plugInOpcodeSetBlockSize,
+ plugInOpcodeResumeSuspend,
+ plugInOpcodeGetEditorBounds,
+ plugInOpcodeOpenEditor,
+ plugInOpcodeCloseEditor,
+ plugInOpcodeDrawEditor,
+ plugInOpcodeGetMouse,
+ plugInOpcodeEditorIdle = plugInOpcodeGetMouse + 2,
+ plugInOpcodeeffEditorTop,
+ plugInOpcodeSleepEditor,
+ plugInOpcodeIdentify,
+ plugInOpcodeGetData,
+ plugInOpcodeSetData,
+ plugInOpcodePreAudioProcessingEvents,
+ plugInOpcodeIsParameterAutomatable,
+ plugInOpcodeParameterValueForText,
+ plugInOpcodeGetProgramName = plugInOpcodeParameterValueForText + 2,
+ plugInOpcodeConnectInput = plugInOpcodeGetProgramName + 2,
+ plugInOpcodeConnectOutput,
+ plugInOpcodeGetInputPinProperties,
+ plugInOpcodeGetOutputPinProperties,
+ plugInOpcodeGetPlugInCategory,
+ plugInOpcodeSetSpeakerConfiguration = plugInOpcodeGetPlugInCategory + 7,
+ plugInOpcodeSetBypass = plugInOpcodeSetSpeakerConfiguration + 2,
+ plugInOpcodeGetPlugInName,
+ plugInOpcodeGetManufacturerName = plugInOpcodeGetPlugInName + 2,
+ plugInOpcodeGetManufacturerProductName,
+ plugInOpcodeGetManufacturerVersion,
+ plugInOpcodeManufacturerSpecific,
+ plugInOpcodeCanPlugInDo,
+ plugInOpcodeGetTailSize,
+ plugInOpcodeIdle,
+ plugInOpcodeKeyboardFocusRequired = plugInOpcodeIdle + 4,
+ plugInOpcodeGetVstInterfaceVersion,
+ plugInOpcodeGetCurrentMidiProgram = plugInOpcodeGetVstInterfaceVersion + 5,
+ plugInOpcodeGetSpeakerArrangement = plugInOpcodeGetCurrentMidiProgram + 6,
+ plugInOpcodeNextPlugInUniqueID,
+ plugInOpcodeStartProcess,
+ plugInOpcodeStopProcess,
+ plugInOpcodeSetNumberOfSamplesToProcess,
+ plugInOpcodeSetSampleFloatType = plugInOpcodeSetNumberOfSamplesToProcess + 4,
+ pluginOpcodeGetNumMidiInputChannels,
+ pluginOpcodeGetNumMidiOutputChannels,
+ plugInOpcodeMaximum = pluginOpcodeGetNumMidiOutputChannels
+};
+
+
+enum VstPlugInToHostOpcodes
+{
+ hostOpcodeParameterChanged,
+ hostOpcodeVstVersion,
+ hostOpcodeCurrentId,
+ hostOpcodeIdle,
+ hostOpcodePinConnected,
+ hostOpcodePlugInWantsMidi = hostOpcodePinConnected + 2,
+ hostOpcodeGetTimingInfo,
+ hostOpcodePreAudioProcessingEvents,
+ hostOpcodeSetTime,
+ hostOpcodeTempoAt,
+ hostOpcodeGetNumberOfAutomatableParameters,
+ hostOpcodeGetParameterInterval,
+ hostOpcodeIOModified,
+ hostOpcodeNeedsIdle,
+ hostOpcodeWindowSize,
+ hostOpcodeGetSampleRate,
+ hostOpcodeGetBlockSize,
+ hostOpcodeGetInputLatency,
+ hostOpcodeGetOutputLatency,
+ hostOpcodeGetPreviousPlugIn,
+ hostOpcodeGetNextPlugIn,
+ hostOpcodeWillReplace,
+ hostOpcodeGetCurrentAudioProcessingLevel,
+ hostOpcodeGetAutomationState,
+ hostOpcodeOfflineStart,
+ hostOpcodeOfflineReadSource,
+ hostOpcodeOfflineWrite,
+ hostOpcodeOfflineGetCurrentPass,
+ hostOpcodeOfflineGetCurrentMetaPass,
+ hostOpcodeSetOutputSampleRate,
+ hostOpcodeGetOutputSpeakerConfiguration,
+ hostOpcodeGetManufacturerName,
+ hostOpcodeGetProductName,
+ hostOpcodeGetManufacturerVersion,
+ hostOpcodeManufacturerSpecific,
+ hostOpcodeSetIcon,
+ hostOpcodeCanHostDo,
+ hostOpcodeGetLanguage,
+ hostOpcodeOpenEditorWindow,
+ hostOpcodeCloseEditorWindow,
+ hostOpcodeGetDirectory,
+ hostOpcodeUpdateView,
+ hostOpcodeParameterChangeGestureBegin,
+ hostOpcodeParameterChangeGestureEnd,
+};
+
+//==============================================================================
+enum VstProcessingSampleType
+{
+ vstProcessingSampleTypeFloat,
+ vstProcessingSampleTypeDouble
+};
+
+//==============================================================================
+// These names must be identical to the Steinberg SDK so JUCE users can set
+// exactly what they want.
+enum VstPlugInCategory
+{
+ kPlugCategUnknown,
+ kPlugCategEffect,
+ kPlugCategSynth,
+ kPlugCategAnalysis,
+ kPlugCategMastering,
+ kPlugCategSpacializer,
+ kPlugCategRoomFx,
+ kPlugSurroundFx,
+ kPlugCategRestoration,
+ kPlugCategOfflineProcess,
+ kPlugCategShell,
+ kPlugCategGenerator
+};
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstEditorBounds
+{
+ int16 upper;
+ int16 leftmost;
+ int16 lower;
+ int16 rightmost;
+};
+
+//==============================================================================
+enum VstMaxStringLengths
+{
+ vstMaxNameLength = 64,
+ vstMaxParameterOrPinLabelLength = 64,
+ vstMaxParameterOrPinShortLabelLength = 8,
+ vstMaxCategoryLength = 24,
+ vstMaxManufacturerStringLength = 64,
+ vstMaxPlugInNameStringLength = 64
+};
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstPinInfo
+{
+ char text[vstMaxParameterOrPinLabelLength];
+ int32 flags;
+ int32 configurationType;
+ char shortText[vstMaxParameterOrPinShortLabelLength];
+ char unused[48];
+};
+
+enum VstPinInfoFlags
+{
+ vstPinInfoFlagIsActive = 1,
+ vstPinInfoFlagIsStereo = 2,
+ vstPinInfoFlagValid = 4
+};
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstEvent
+{
+ int32 type;
+ int32 size;
+ int32 sampleOffset;
+ int32 flags;
+ char content[16];
+};
+
+enum VstEventTypes
+{
+ vstMidiEventType = 1,
+ vstSysExEventType = 6
+};
+
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstEventBlock
+{
+ int32 numberOfEvents;
+ pointer_sized_int future;
+ VstEvent* events[2];
+};
+
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstMidiEvent
+{
+ int32 type;
+ int32 size;
+ int32 sampleOffset;
+ int32 flags;
+ int32 noteSampleLength;
+ int32 noteSampleOffset;
+ char midiData[4];
+ char tuning;
+ char noteVelocityOff;
+ char future1;
+ char future2;
+};
+
+enum VstMidiEventFlags
+{
+ vstMidiEventIsRealtime = 1
+};
+
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstSysExEvent
+{
+ int32 type;
+ int32 size;
+ int32 offsetSamples;
+ int32 flags;
+ int32 sysExDumpSize;
+ pointer_sized_int future1;
+ char* sysExDump;
+ pointer_sized_int future2;
+};
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstTimingInformation
+{
+ double samplePosition;
+ double sampleRate;
+ double systemTimeNanoseconds;
+ double musicalPosition;
+ double tempoBPM;
+ double lastBarPosition;
+ double loopStartPosition;
+ double loopEndPosition;
+ int32 timeSignatureNumerator;
+ int32 timeSignatureDenominator;
+ int32 smpteOffset;
+ int32 smpteRate;
+ int32 samplesToNearestClock;
+ int32 flags;
+};
+
+enum VstTimingInformationFlags
+{
+ vstTimingInfoFlagTransportChanged = 1,
+ vstTimingInfoFlagCurrentlyPlaying = 2,
+ vstTimingInfoFlagLoopActive = 4,
+ vstTimingInfoFlagCurrentlyRecording = 8,
+ vstTimingInfoFlagAutomationWriteModeActive = 64,
+ vstTimingInfoFlagAutomationReadModeActive = 128,
+ vstTimingInfoFlagNanosecondsValid = 256,
+ vstTimingInfoFlagMusicalPositionValid = 512,
+ vstTimingInfoFlagTempoValid = 1024,
+ vstTimingInfoFlagLastBarPositionValid = 2048,
+ vstTimingInfoFlagLoopPositionValid = 4096,
+ vstTimingInfoFlagTimeSignatureValid = 8192,
+ vstTimingInfoFlagSmpteValid = 16384,
+ vstTimingInfoFlagNearestClockValid = 32768
+};
+
+//==============================================================================
+enum VstSmpteRates
+{
+ vstSmpteRateFps24,
+ vstSmpteRateFps25,
+ vstSmpteRateFps2997,
+ vstSmpteRateFps30,
+ vstSmpteRateFps2997drop,
+ vstSmpteRateFps30drop,
+
+ vstSmpteRate16mmFilm,
+ vstSmpteRate35mmFilm,
+
+ vstSmpteRateFps239 = vstSmpteRate35mmFilm + 3,
+ vstSmpteRateFps249 ,
+ vstSmpteRateFps599,
+ vstSmpteRateFps60
+};
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstIndividualSpeakerInfo
+{
+ float azimuthalAngle;
+ float elevationAngle;
+ float radius;
+ float reserved;
+ char label[vstMaxNameLength];
+ int32 type;
+ char unused[28];
+};
+
+enum VstIndividualSpeakerType
+{
+ vstIndividualSpeakerTypeUndefined = 0x7fffffff,
+ vstIndividualSpeakerTypeMono = 0,
+ vstIndividualSpeakerTypeLeft,
+ vstIndividualSpeakerTypeRight,
+ vstIndividualSpeakerTypeCentre,
+ vstIndividualSpeakerTypeLFE,
+ vstIndividualSpeakerTypeLeftSurround,
+ vstIndividualSpeakerTypeRightSurround,
+ vstIndividualSpeakerTypeLeftCentre,
+ vstIndividualSpeakerTypeRightCentre,
+ vstIndividualSpeakerTypeSurround,
+ vstIndividualSpeakerTypeCentreSurround = vstIndividualSpeakerTypeSurround,
+ vstIndividualSpeakerTypeLeftRearSurround,
+ vstIndividualSpeakerTypeRightRearSurround,
+ vstIndividualSpeakerTypeTopMiddle,
+ vstIndividualSpeakerTypeTopFrontLeft,
+ vstIndividualSpeakerTypeTopFrontCentre,
+ vstIndividualSpeakerTypeTopFrontRight,
+ vstIndividualSpeakerTypeTopRearLeft,
+ vstIndividualSpeakerTypeTopRearCentre,
+ vstIndividualSpeakerTypeTopRearRight,
+ vstIndividualSpeakerTypeLFE2
+};
+
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct VstSpeakerConfiguration
+{
+ int32 type;
+ int32 numberOfChannels;
+ VstIndividualSpeakerInfo speakers[8];
+};
+
+enum VstSpeakerConfigurationType
+{
+ vstSpeakerConfigTypeUser = -2,
+ vstSpeakerConfigTypeEmpty = -1,
+ vstSpeakerConfigTypeMono = 0,
+ vstSpeakerConfigTypeLR,
+ vstSpeakerConfigTypeLsRs,
+ vstSpeakerConfigTypeLcRc,
+ vstSpeakerConfigTypeSlSr,
+ vstSpeakerConfigTypeCLfe,
+ vstSpeakerConfigTypeLRC,
+ vstSpeakerConfigTypeLRS,
+ vstSpeakerConfigTypeLRCLfe,
+ vstSpeakerConfigTypeLRLfeS,
+ vstSpeakerConfigTypeLRCS,
+ vstSpeakerConfigTypeLRLsRs,
+ vstSpeakerConfigTypeLRCLfeS,
+ vstSpeakerConfigTypeLRLfeLsRs,
+ vstSpeakerConfigTypeLRCLsRs,
+ vstSpeakerConfigTypeLRCLfeLsRs,
+ vstSpeakerConfigTypeLRCLsRsCs,
+ vstSpeakerConfigTypeLRLsRsSlSr,
+ vstSpeakerConfigTypeLRCLfeLsRsCs,
+ vstSpeakerConfigTypeLRLfeLsRsSlSr,
+ vstSpeakerConfigTypeLRCLsRsLcRc,
+ vstSpeakerConfigTypeLRCLsRsSlSr,
+ vstSpeakerConfigTypeLRCLfeLsRsLcRc,
+ vstSpeakerConfigTypeLRCLfeLsRsSlSr,
+ vstSpeakerConfigTypeLRCLsRsLcRcCs,
+ vstSpeakerConfigTypeLRCLsRsCsSlSr,
+ vstSpeakerConfigTypeLRCLfeLsRsLcRcCs,
+ vstSpeakerConfigTypeLRCLfeLsRsCsSlSr,
+ vstSpeakerConfigTypeLRCLfeLsRsTflTfcTfrTrlTrrLfe2
+};
+
+#if JUCE_BIG_ENDIAN
+ #define JUCE_MULTICHAR_CONSTANT(a, b, c, d) (a | (((uint32) b) << 8) | (((uint32) c) << 16) | (((uint32) d) << 24))
+#else
+ #define JUCE_MULTICHAR_CONSTANT(a, b, c, d) (d | (((uint32) c) << 8) | (((uint32) b) << 16) | (((uint32) a) << 24))
+#endif
+
+enum PresonusExtensionConstants
+{
+ presonusVendorID = JUCE_MULTICHAR_CONSTANT ('P', 'r', 'e', 'S'),
+ presonusSetContentScaleFactor = JUCE_MULTICHAR_CONSTANT ('A', 'e', 'C', 's')
+};
+
+//==============================================================================
+/** Structure used for VSTs
+
+ @tags{Audio}
+*/
+struct vst2FxBank
+{
+ int32 magic1;
+ int32 size;
+ int32 magic2;
+ int32 version1;
+ int32 fxID;
+ int32 version2;
+ int32 elements;
+ int32 current;
+ char shouldBeZero[124];
+ int32 chunkSize;
+ char chunk[1];
+};
+
+#if JUCE_MSVC
+ #pragma pack(pop)
+#elif JUCE_MAC || JUCE_IOS
+ #pragma options align=reset
+#else
+ #pragma pack(pop)
+#endif
+
+#endif // JUCE_VSTINTERFACE_H_INCLUDED

+ 100
- 0
libs/juce7/patches/05_mingw-fixes.patch View File

@@ -0,0 +1,100 @@
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 3fcb6f54a..dd044d108 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 f3a3ba2f8..7336fff7d 100644
--- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
@@ -57,9 +57,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 6755bba64..3ebe35f2b 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -67,10 +67,13 @@
#include <vfw.h>
#include <commdlg.h>
#include <commctrl.h>
- #include <UIAutomation.h>
#include <sapi.h>
#include <Dxgi.h>
+ #if JUCE_MSVC
+ #include <UIAutomation.h>
+ #endif
+
#if JUCE_WEB_BROWSER
#include <exdisp.h>
#include <exdispid.h>
@@ -287,13 +290,15 @@ namespace juce
#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 cb247722a..7a012c39c 100644
--- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
@@ -1667,8 +1667,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);
@@ -4246,6 +4248,7 @@ private:
case WM_GETDLGCODE:
return DLGC_WANTALLKEYS;
+ #if JUCE_MSVC
case WM_GETOBJECT:
{
if (static_cast<long> (lParam) == WindowsAccessibility::getUiaRootObjectId())
@@ -4264,6 +4267,7 @@ private:
break;
}
+ #endif
default:
break;
}

+ 30
- 0
libs/juce7/patches/06_fix-coregraphics-rendering-macro-usage.patch View File

@@ -0,0 +1,30 @@
diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
index 17361fc7e..1fed43c3d 100644
--- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
+++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
@@ -1089,6 +1089,7 @@ public:
auto dispatchRectangles = [this] ()
{
+ #if USE_COREGRAPHICS_RENDERING
if (@available (macOS 10.14, *))
{
if (metalRenderer != nullptr)
@@ -1101,6 +1102,7 @@ public:
deferredRepaints);
}
}
+ #endif
for (auto& i : deferredRepaints)
[view setNeedsDisplayInRect: makeNSRect (i)];
@@ -1900,7 +1902,9 @@ private:
CVDisplayLinkRef displayLink = nullptr;
dispatch_source_t displaySource = nullptr;
+ #if USE_COREGRAPHICS_RENDERING
std::unique_ptr<CoreGraphicsMetalLayerRenderer> metalRenderer;
+ #endif
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NSViewComponentPeer)
};

+ 13
- 0
libs/juce7/patches/07_allow-local-ladspa.patch View File

@@ -0,0 +1,13 @@
diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
index cec1528a4..2ad49260d 100644
--- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
@@ -25,7 +25,7 @@
#if JUCE_PLUGINHOST_LADSPA && (JUCE_LINUX || JUCE_BSD)
-#include <ladspa.h>
+#include "ladspa.h"
namespace juce
{

+ 127
- 0
libs/juce7/patches/08_remove-splashscreen.patch View File

@@ -0,0 +1,127 @@
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp
index 3b88ccee0..cb6f1ce60 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp
@@ -40,8 +40,6 @@ AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* p) noexcept : proce
AudioProcessorEditor::~AudioProcessorEditor()
{
- splashScreen.deleteAndZero();
-
// if this fails, then the wrapper hasn't called editorBeingDeleted() on the
// filter for some reason..
jassert (processor.getActiveEditor() != this);
@@ -56,23 +54,6 @@ void AudioProcessorEditor::hostMIDIControllerIsAvailable (bool) {
void AudioProcessorEditor::initialise()
{
- /*
- ==========================================================================
- In accordance with the terms of the JUCE 7 End-Use License Agreement, the
- JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
- ineffective unless you have a JUCE Indie or Pro license, or are using
- JUCE under the GPL v3 license.
-
- End User License Agreement: www.juce.com/juce-7-licence
- ==========================================================================
- */
-
- // BEGIN SECTION A
-
- splashScreen = new JUCESplashScreen (*this);
-
- // END SECTION A
-
attachConstrainer (&defaultConstrainer);
resizeListener.reset (new AudioProcessorEditorListener (*this));
addComponentListener (resizeListener.get());
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
index df43af642..af1805ac3 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h
@@ -235,7 +235,6 @@ private:
ComponentBoundsConstrainer defaultConstrainer;
ComponentBoundsConstrainer* constrainer = nullptr;
AudioProcessorEditorHostContext* hostContext = nullptr;
- Component::SafePointer<Component> splashScreen;
AffineTransform hostScaleTransform;
JUCE_DECLARE_NON_COPYABLE (AudioProcessorEditor)
diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp
index 3ebe35f2b..944d25b1c 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -252,7 +252,6 @@ namespace juce
#include "misc/juce_BubbleComponent.cpp"
#include "misc/juce_DropShadower.cpp"
#include "misc/juce_FocusOutline.cpp"
-#include "misc/juce_JUCESplashScreen.cpp"
#include "layout/juce_FlexBox.cpp"
#include "layout/juce_GridItem.cpp"
diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h
index 40b367eb3..3f7368dd1 100644
--- a/modules/juce_gui_basics/juce_gui_basics.h
+++ b/modules/juce_gui_basics/juce_gui_basics.h
@@ -265,7 +265,6 @@ namespace juce
#include "buttons/juce_ToolbarButton.h"
#include "misc/juce_DropShadower.h"
#include "misc/juce_FocusOutline.h"
-#include "misc/juce_JUCESplashScreen.h"
#include "widgets/juce_TreeView.h"
#include "windows/juce_TopLevelWindow.h"
#include "windows/juce_MessageBoxOptions.h"
diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
index 8b711b504..db28b93a9 100644
--- a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
+++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
@@ -41,8 +41,6 @@ ResizableWindow::ResizableWindow (const String& name, Colour bkgnd, bool shouldA
ResizableWindow::~ResizableWindow()
{
- splashScreen.deleteAndZero();
-
// Don't delete or remove the resizer components yourself! They're managed by the
// ResizableWindow, and you should leave them alone! You may have deleted them
// accidentally by careless use of deleteAllChildren()..?
@@ -60,27 +58,6 @@ ResizableWindow::~ResizableWindow()
void ResizableWindow::initialise (const bool shouldAddToDesktop)
{
- /*
- ==========================================================================
-
- In accordance with the terms of the JUCE 7 End-Use License Agreement, the
- JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
- ineffective unless you have a JUCE Indie or Pro license, or are using
- JUCE under the GPL v3 license.
-
- End User License Agreement: www.juce.com/juce-7-licence
-
- ==========================================================================
- */
-
- // BEGIN SECTION A
-
- #if ! JucePlugin_Build_Standalone
- splashScreen = new JUCESplashScreen (*this);
- #endif
-
- // END SECTION A
-
defaultConstrainer.setMinimumOnscreenAmounts (0x10000, 16, 24, 16);
lastNonFullScreenPos.setBounds (50, 50, 256, 256);
diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.h b/modules/juce_gui_basics/windows/juce_ResizableWindow.h
index b381b73fb..d6469c35d 100644
--- a/modules/juce_gui_basics/windows/juce_ResizableWindow.h
+++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.h
@@ -391,7 +391,7 @@ protected:
private:
//==============================================================================
- Component::SafePointer<Component> contentComponent, splashScreen;
+ Component::SafePointer<Component> contentComponent;
bool ownsContentComponent = false, resizeToFitContent = false, fullscreen = false, canDrag = true, dragStarted = false;
ComponentDragger dragger;
Rectangle<int> lastNonFullScreenPos;

+ 46
- 0
libs/juce7/patches/09_proper-getExecutableFile.patch View File

@@ -0,0 +1,46 @@
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index 700e191e9..b0df41553 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -617,12 +617,39 @@ File juce_getExecutableFile()
auto localSymbol = (void*) juce_getExecutableFile;
dladdr (localSymbol, &exeInfo);
- return CharPointer_UTF8 (exeInfo.dli_fname);
+
+ const CharPointer_UTF8 filename (exeInfo.dli_fname);
+
+ // if the filename is absolute simply return it
+ if (File::isAbsolutePath (filename))
+ return filename;
+
+ // if the filename is relative construct from CWD
+ if (filename[0] == '.')
+ return File::getCurrentWorkingDirectory().getChildFile (filename).getFullPathName();
+
+ // filename is abstract, look up in PATH
+ if (const char* const envpath = ::getenv ("PATH"))
+ {
+ StringArray paths (StringArray::fromTokens (envpath, ":", ""));
+
+ for (int i=paths.size(); --i>=0;)
+ {
+ const File filepath (File (paths[i]).getChildFile (filename));
+
+ if (filepath.existsAsFile())
+ return filepath.getFullPathName();
+ }
+ }
+
+ // if we reach this, we failed to find ourselves...
+ jassertfalse;
+ return filename;
}
};
static String filename = DLAddrReader::getFilename();
- return File::getCurrentWorkingDirectory().getChildFile (filename);
+ return filename;
}
//==============================================================================

+ 118
- 0
libs/juce7/patches/10_fix-fork-exec-usage.patch View File

@@ -0,0 +1,118 @@
diff --git a/modules/juce_core/native/juce_linux_Files.cpp b/modules/juce_core/native/juce_linux_Files.cpp
index f661e4ab4..dce73fcc2 100644
--- a/modules/juce_core/native/juce_linux_Files.cpp
+++ b/modules/juce_core/native/juce_linux_Files.cpp
@@ -223,15 +223,21 @@ bool Process::openDocument (const String& fileName, const String& parameters)
const char* const argv[] = { "/bin/sh", "-c", cmdString.toUTF8(), nullptr };
+#if JUCE_USE_VFORK
+ const auto cpid = vfork();
+#else
const auto cpid = fork();
+#endif
if (cpid == 0)
{
+#if ! JUCE_USE_VFORK
setsid();
+#endif
// Child process
- execve (argv[0], (char**) argv, environ);
- exit (0);
+ if (execve (argv[0], (char**) argv, environ) < 0)
+ _exit (0);
}
return cpid >= 0;
diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm
index aefa76317..066c12cde 100644
--- a/modules/juce_core/native/juce_mac_Files.mm
+++ b/modules/juce_core/native/juce_mac_Files.mm
@@ -92,23 +92,22 @@ namespace MacFileHelpers
#else
static bool launchExecutable (const String& pathAndArguments)
{
+ const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), nullptr };
+
+#if JUCE_USE_VFORK
+ const auto cpid = vfork();
+#else
auto cpid = fork();
+#endif
if (cpid == 0)
{
- const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), nullptr };
-
// Child process
- if (execve (argv[0], (char**) argv, nullptr) < 0)
- exit (0);
- }
- else
- {
- if (cpid < 0)
- return false;
+ if (execvp (argv[0], (char**) argv) < 0)
+ _exit (0);
}
- return true;
+ return cpid >= 0;
}
#endif
}
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index b0df41553..83c359154 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -1131,7 +1131,18 @@ public:
if (pipe (pipeHandles) == 0)
{
- auto result = fork();
+ Array<char*> argv;
+ for (auto& arg : arguments)
+ if (arg.isNotEmpty())
+ argv.add (const_cast<char*> (arg.toRawUTF8()));
+
+ argv.add (nullptr);
+
+#if JUCE_USE_VFORK
+ const pid_t result = vfork();
+#else
+ const pid_t result = fork();
+#endif
if (result < 0)
{
@@ -1140,6 +1151,7 @@ public:
}
else if (result == 0)
{
+#if ! JUCE_USE_VFORK
// we're the child process..
close (pipeHandles[0]); // close the read handle
@@ -1154,17 +1166,10 @@ public:
dup2 (open ("/dev/null", O_WRONLY), STDERR_FILENO);
close (pipeHandles[1]);
+#endif
- Array<char*> argv;
-
- for (auto& arg : arguments)
- if (arg.isNotEmpty())
- argv.add (const_cast<char*> (arg.toRawUTF8()));
-
- argv.add (nullptr);
-
- execvp (exe.toRawUTF8(), argv.getRawDataPointer());
- _exit (-1);
+ if (execvp (exe.toRawUTF8(), argv.getRawDataPointer()) < 0)
+ _exit (-1);
}
else
{

+ 61
- 0
libs/juce7/patches/11_childprocess-getPID.patch View File

@@ -0,0 +1,61 @@
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index 83c359154..efe1bda73 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -1266,6 +1266,11 @@ public:
return 0;
}
+ int getPID() const noexcept
+ {
+ return childPID;
+ }
+
int childPID = 0;
int pipeHandle = 0;
int exitCode = -1;
diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp
index 8d15042fe..867e6fd2f 100644
--- a/modules/juce_core/native/juce_win32_Threads.cpp
+++ b/modules/juce_core/native/juce_win32_Threads.cpp
@@ -489,6 +489,11 @@ public:
return (uint32) exitCode;
}
+ int getPID() const noexcept
+ {
+ return 0;
+ }
+
bool ok;
private:
diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp
index 1e559b1c9..40ad651f0 100644
--- a/modules/juce_core/threads/juce_ChildProcess.cpp
+++ b/modules/juce_core/threads/juce_ChildProcess.cpp
@@ -81,6 +81,11 @@ String ChildProcess::readAllProcessOutput()
}
+int ChildProcess::getPID() const noexcept
+{
+ return activeProcess != nullptr ? activeProcess->getPID() : 0;
+}
+
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/modules/juce_core/threads/juce_ChildProcess.h
index 3c5e83bba..f6076fb82 100644
--- a/modules/juce_core/threads/juce_ChildProcess.h
+++ b/modules/juce_core/threads/juce_ChildProcess.h
@@ -101,6 +101,8 @@ public:
*/
bool kill();
+ int getPID() const noexcept;
+
private:
//==============================================================================
class ActiveProcess;

+ 39
- 0
libs/juce7/patches/12_linux-filechooser-needs-modal-loops.patch View File

@@ -0,0 +1,39 @@
diff --git a/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp b/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
index c12bc5f67..df8132b69 100644
--- a/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
+++ b/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
@@ -26,6 +26,7 @@
namespace juce
{
+#if JUCE_MODAL_LOOPS_PERMITTED
static bool exeIsAvailable (String executable)
{
ChildProcess child;
@@ -255,10 +256,11 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Native)
};
+#endif
bool FileChooser::isPlatformDialogAvailable()
{
- #if JUCE_DISABLE_NATIVE_FILECHOOSERS
+ #if JUCE_DISABLE_NATIVE_FILECHOOSERS || ! JUCE_MODAL_LOOPS_PERMITTED
return false;
#else
static bool canUseNativeBox = exeIsAvailable ("zenity") || exeIsAvailable ("kdialog");
@@ -268,7 +270,13 @@ bool FileChooser::isPlatformDialogAvailable()
std::shared_ptr<FileChooser::Pimpl> FileChooser::showPlatformDialog (FileChooser& owner, int flags, FilePreviewComponent*)
{
+#if JUCE_MODAL_LOOPS_PERMITTED
return std::make_shared<Native> (owner, flags);
+#else
+ ignoreUnused (owner);
+ ignoreUnused (flags);
+ return nullptr;
+#endif
}
} // namespace juce

+ 109
- 0
libs/juce7/patches/13_dialogwindow-allow-native-titlebar.patch View File

@@ -0,0 +1,109 @@
diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
index 2f5338f1c..789e6dc20 100644
--- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
+++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp
@@ -921,7 +921,7 @@ void MainHostWindow::showAudioSettings()
o.componentToCentreAround = this;
o.dialogBackgroundColour = getLookAndFeel().findColour (ResizableWindow::backgroundColourId);
o.escapeKeyTriggersCloseButton = true;
- o.useNativeTitleBar = false;
+ o.useNativeTitleBar = true;
o.resizable = false;
auto* w = o.create();
diff --git a/modules/juce_gui_basics/windows/juce_DialogWindow.cpp b/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
index b024f9dde..c866ff208 100644
--- a/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
+++ b/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
@@ -134,7 +134,8 @@ void DialogWindow::showDialog (const String& dialogTitle,
Colour backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool resizable,
- const bool useBottomRightCornerResizer)
+ const bool useBottomRightCornerResizer,
+ const bool useNativeTitleBar)
{
LaunchOptions o;
o.dialogTitle = dialogTitle;
@@ -142,9 +143,9 @@ void DialogWindow::showDialog (const String& dialogTitle,
o.componentToCentreAround = componentToCentreAround;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = escapeKeyTriggersCloseButton;
- o.useNativeTitleBar = false;
o.resizable = resizable;
o.useBottomRightCornerResizer = useBottomRightCornerResizer;
+ o.useNativeTitleBar = useNativeTitleBar;
o.launchAsync();
}
@@ -156,7 +157,8 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
Colour backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool resizable,
- const bool useBottomRightCornerResizer)
+ const bool useBottomRightCornerResizer,
+ const bool useNativeTitleBar)
{
LaunchOptions o;
o.dialogTitle = dialogTitle;
@@ -164,9 +166,9 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
o.componentToCentreAround = componentToCentreAround;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = escapeKeyTriggersCloseButton;
- o.useNativeTitleBar = false;
o.resizable = resizable;
o.useBottomRightCornerResizer = useBottomRightCornerResizer;
+ o.useNativeTitleBar = useNativeTitleBar;
return o.runModal();
}
diff --git a/modules/juce_gui_basics/windows/juce_DialogWindow.h b/modules/juce_gui_basics/windows/juce_DialogWindow.h
index 484a08384..ad94a08ee 100644
--- a/modules/juce_gui_basics/windows/juce_DialogWindow.h
+++ b/modules/juce_gui_basics/windows/juce_DialogWindow.h
@@ -199,7 +199,8 @@ public:
Colour backgroundColour,
bool escapeKeyTriggersCloseButton,
bool shouldBeResizable = false,
- bool useBottomRightCornerResizer = false);
+ bool useBottomRightCornerResizer = false,
+ bool useNativeTitleBar = true);
#if JUCE_MODAL_LOOPS_PERMITTED
/** Easy way of quickly showing a dialog box containing a given component.
@@ -245,7 +246,8 @@ public:
Colour backgroundColour,
bool escapeKeyTriggersCloseButton,
bool shouldBeResizable = false,
- bool useBottomRightCornerResizer = false);
+ bool useBottomRightCornerResizer = false,
+ bool useNativeTitleBar = true);
#endif
diff --git a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h
index 2eb400a70..4cd5aefe0 100644
--- a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h
+++ b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h
@@ -154,7 +154,7 @@ protected:
private:
friend class TopLevelWindowManager;
friend class ResizableWindow;
- bool useDropShadow = true, useNativeTitleBar = false, isCurrentlyActive = false;
+ bool useDropShadow = true, useNativeTitleBar = true, isCurrentlyActive = false;
std::unique_ptr<DropShadower> shadower;
std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override;
diff --git a/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp b/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp
index b90412cf2..b6c92e9fd 100644
--- a/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp
+++ b/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp
@@ -92,7 +92,7 @@ void PreferencesPanel::showInDialogBox (const String& dialogTitle, int dialogWid
o.dialogTitle = dialogTitle;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = false;
- o.useNativeTitleBar = false;
+ o.useNativeTitleBar = true;
o.resizable = false;
o.launchAsync();

+ 23
- 0
libs/juce7/patches/14_fix-x11-temporary-windows.patch View File

@@ -0,0 +1,23 @@
diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
index da1a27308..3291db8a3 100644
--- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
+++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
@@ -2979,10 +2979,14 @@ void XWindowSystem::setWindowType (::Window windowH, int styleFlags) const
if (atoms.windowType != None)
{
- auto hint = (styleFlags & ComponentPeer::windowIsTemporary) != 0
- || ((styleFlags & ComponentPeer::windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows())
- ? XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_COMBO")
- : XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_NORMAL");
+ Atom hint = None;
+
+ if (styleFlags & ComponentPeer::windowIsTemporary)
+ hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_TOOLTIP");
+ else if ((styleFlags & ComponentPeer::windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows())
+ hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_COMBO");
+ else
+ hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_NORMAL");
if (hint != None)
xchangeProperty (windowH, atoms.windowType, XA_ATOM, 32, &hint, 1);

+ 14
- 0
libs/juce7/patches/15_fix-usage-with-vestige.patch View File

@@ -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 dcf0ff8f6..f497fef96 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

+ 14
- 0
libs/juce7/patches/17_allow-vst2-without-audio.patch View File

@@ -0,0 +1,14 @@
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 dd044d108..4da23cdf5 100644
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
@@ -252,9 +252,6 @@ public:
// You must at least have some channels
jassert (processor->isMidiEffect() || (maxNumInChannels > 0 || maxNumOutChannels > 0));
- if (processor->isMidiEffect())
- maxNumInChannels = maxNumOutChannels = 2;
-
#ifdef JucePlugin_PreferredChannelConfigurations
processor->setPlayConfigDetails (maxNumInChannels, maxNumOutChannels, 44100.0, 1024);
#endif

+ 13
- 0
libs/juce7/patches/18_dynamic-vst2-plugin-name.patch View File

@@ -0,0 +1,13 @@
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 4da23cdf5..914fd6b44 100644
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
@@ -1824,7 +1824,7 @@ private:
pointer_sized_int handleGetPlugInName (VstOpCodeArguments args)
{
- String (JucePlugin_Name).copyToUTF8 ((char*) args.ptr, 64 + 1);
+ String (processor->getName()).copyToUTF8 ((char*) args.ptr, 64 + 1);
return 1;
}

+ 38
- 0
libs/juce7/patches/19_projucer-gpl-mode.patch View File

@@ -0,0 +1,38 @@
diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile
index 6f21d6bc3..30157aa7a 100644
--- a/extras/Projucer/Builds/LinuxMakefile/Makefile
+++ b/extras/Projucer/Builds/LinuxMakefile/Makefile
@@ -39,7 +39,7 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH :=
endif
- JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
+ JUCE_CPPFLAGS := $(DEPFLAGS) "-DJUCER_ENABLE_GPL_MODE=1" "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=0" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
JUCE_TARGET_APP := Projucer
@@ -60,7 +60,7 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH :=
endif
- JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
+ JUCE_CPPFLAGS := $(DEPFLAGS) "-DJUCER_ENABLE_GPL_MODE=1" "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70001" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=0" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.1" "-DJUCE_APP_VERSION_HEX=0x70001" $(shell $(PKG_CONFIG) --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS)
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
JUCE_TARGET_APP := Projucer
diff --git a/extras/Projucer/CMakeLists.txt b/extras/Projucer/CMakeLists.txt
index 6e76a0076..78912c4c0 100644
--- a/extras/Projucer/CMakeLists.txt
+++ b/extras/Projucer/CMakeLists.txt
@@ -90,8 +90,9 @@ target_compile_definitions(Projucer PRIVATE
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
JUCE_LOG_ASSERTIONS=1
JUCE_STRICT_REFCOUNTEDPOINTER=1
- JUCE_USE_CURL=1
- JUCE_WEB_BROWSER=0)
+ JUCE_USE_CURL=0
+ JUCE_WEB_BROWSER=0
+ JUCER_ENABLE_GPL_MODE=1)
juce_add_binary_data(ProjucerData SOURCES
Source/BinaryData/Icons/background_logo.svg

+ 420
- 0
libs/juce7/patches/21_audioprocessor-no-gui.patch View File

@@ -0,0 +1,420 @@
diff --git a/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp b/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp
index dc2e6cc83..425f7ac23 100644
--- a/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp
+++ b/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp
@@ -39,12 +39,17 @@
#include <juce_audio_plugin_client/juce_audio_plugin_client.h>
#include <juce_audio_plugin_client/utility/juce_CheckSettingMacros.h>
-#include <juce_audio_plugin_client/utility/juce_LinuxMessageThread.h>
+#if ! JUCE_AUDIOPROCESSOR_NO_GUI
+ #include <juce_audio_plugin_client/utility/juce_LinuxMessageThread.h>
+#endif
#include <juce_audio_processors/utilities/juce_FlagCache.h>
#include <juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp>
-#include "JuceLV2Defines.h"
+#ifndef JucePlugin_LV2URI
+ #include "JuceLV2Defines.h"
+#endif
+
#include <juce_audio_processors/format_types/juce_LV2Common.h>
#include <fstream>
@@ -693,6 +698,7 @@ public:
return LV2_STATE_SUCCESS;
}
+ #if ! JUCE_AUDIOPROCESSOR_NO_GUI
std::unique_ptr<AudioProcessorEditor> createEditor()
{
return std::unique_ptr<AudioProcessorEditor> (processor->createEditorIfNeeded());
@@ -702,6 +708,7 @@ public:
{
processor->editorBeingDeleted (editor);
}
+ #endif
static std::unique_ptr<AudioProcessor> createProcessorInstance()
{
@@ -759,7 +766,7 @@ private:
ScopedJuceInitialiser_GUI scopedJuceInitialiser;
- #if JUCE_LINUX || JUCE_BSD
+ #if (JUCE_LINUX || JUCE_BSD) && ! JUCE_AUDIOPROCESSOR_NO_GUI
SharedResourcePointer<MessageThread> messageThread;
#endif
@@ -842,6 +849,7 @@ private:
"\tlv2:binary <" << URL::addEscapeChars (libraryPath.getFileName(), false) << "> ;\n"
"\trdfs:seeAlso <dsp.ttl> .\n";
+ #if ! JUCE_AUDIOPROCESSOR_NO_GUI
if (proc.hasEditor())
{
#if JUCE_MAC
@@ -861,6 +869,7 @@ private:
"\trdfs:seeAlso <ui.ttl> .\n"
"\n";
}
+ #endif
for (auto i = 0, end = proc.getNumPrograms(); i < end; ++i)
{
@@ -1088,8 +1097,10 @@ private:
os << "<" JucePlugin_LV2URI ">\n";
+ #if ! JUCE_AUDIOPROCESSOR_NO_GUI
if (proc.hasEditor())
os << "\tui:ui <" << JucePluginLV2UriUi << "> ;\n";
+ #endif
const auto versionParts = StringArray::fromTokens (JucePlugin_VersionString, ".", "");
@@ -1293,6 +1304,7 @@ private:
static Result writeUiTtl (AudioProcessor& proc, const File& libraryPath)
{
+ #if ! JUCE_AUDIOPROCESSOR_NO_GUI
if (! proc.hasEditor())
return Result::ok();
@@ -1331,6 +1343,7 @@ private:
"\topts:supportedOption\n"
"\t\tui:scaleFactor ,\n"
"\t\tparam:sampleRate .\n";
+ #endif
return Result::ok();
}
@@ -1459,6 +1472,7 @@ static Optional<float> findScaleFactor (const LV2_URID_Map* symap, const LV2_Opt
return parser.parseNumericOption<float> (scaleFactorOption);
}
+#if ! JUCE_AUDIOPROCESSOR_NO_GUI
class LV2UIInstance : private Component,
private ComponentListener
{
@@ -1771,6 +1785,7 @@ LV2_SYMBOL_EXPORT const LV2UI_Descriptor* lv2ui_descriptor (uint32_t index)
return &descriptor;
}
+#endif
}
}
diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp
index df3a1e8a9..e0b75a685 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
@@ -42,7 +44,7 @@
#include <juce_gui_extra/juce_gui_extra.h>
//==============================================================================
-#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>
@@ -196,9 +198,11 @@ 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_ARACommon.cpp"
#include "format_types/juce_LADSPAPluginFormat.cpp"
@@ -206,9 +210,11 @@ private:
#include "format_types/juce_VST3PluginFormat.cpp"
#include "format_types/juce_AudioUnitPluginFormat.mm"
#include "format_types/juce_ARAHosting.cpp"
-#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"
@@ -216,7 +222,9 @@ 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"
#include "utilities/juce_NativeScaleFactorNotifier.cpp"
@@ -233,3 +241,8 @@ private:
#include "format_types/juce_LV2PluginFormat_test.cpp"
#endif
#endif
+
+#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 1664b90ae..389caf794 100644
--- a/modules/juce_audio_processors/juce_audio_processors.h
+++ b/modules/juce_audio_processors/juce_audio_processors.h
@@ -138,14 +138,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"
@@ -164,7 +168,9 @@
#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"
#include "utilities/ARA/juce_ARA_utils.h"
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp
index 53aa9c3d8..a84bd22be 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
@@ -874,6 +876,7 @@ void AudioProcessor::audioIOChanged (bool busNumberChanged, bool channelNumChang
processorLayoutsChanged();
}
+#if ! JUCE_AUDIOPROCESSOR_NO_GUI
//==============================================================================
void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) noexcept
{
@@ -910,6 +913,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 36e9769f2..27b5eb9cd 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h
@@ -949,6 +949,7 @@ public:
*/
virtual void setNonRealtime (bool isNonRealtime) noexcept;
+ #if ! JUCE_AUDIOPROCESSOR_NO_GUI
//==============================================================================
/** Creates the processor's GUI.
@@ -998,6 +999,7 @@ public:
This may call createEditor() internally to create the component.
*/
AudioProcessorEditor* createEditorIfNeeded();
+ #endif
//==============================================================================
/** Returns the default number of steps for a parameter.
@@ -1209,9 +1211,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
@@ -1241,7 +1245,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
};
@@ -1490,7 +1496,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 ea943564b..6a0bed1af 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp
@@ -1568,8 +1568,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 5b6908824..f8e534009 100644
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h
@@ -364,8 +364,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;
@@ -401,8 +403,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 caf7eb798..1d59658ab 100644
--- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
+++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
@@ -473,6 +473,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,
@@ -505,6 +506,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 4c498f9b2..4e33e2a67 100644
--- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h
+++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h
@@ -526,6 +526,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.
@@ -593,6 +594,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 6651bddf8..d03d4f792 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 c222899fd..e5ec0a33a 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. */

+ 34
- 0
libs/juce7/patches/22_mingw-filechooser-no-vista.patch View File

@@ -0,0 +1,34 @@
diff --git a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
index 4c3df9e46..70ca644e7 100644
--- a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp
@@ -166,6 +166,7 @@ private:
void operator() (LPWSTR ptr) const noexcept { CoTaskMemFree (ptr); }
};
+ #if JUCE_MSVC
bool showDialog (IFileDialog& dialog, bool async)
{
FILEOPENDIALOGOPTIONS flags = {};
@@ -383,6 +384,7 @@ private:
return result;
}
+ #endif
Array<URL> openDialogPreVista (bool async)
{
@@ -499,11 +501,13 @@ private:
const Remover remover (*this);
+ #if JUCE_MSVC
if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista
&& customComponent == nullptr)
{
return openDialogVistaAndUp (async);
}
+ #endif
return openDialogPreVista (async);
}

+ 20
- 0
libs/juce7/patches/24_extra-gl-functions.patch View File

@@ -0,0 +1,20 @@
diff --git a/modules/juce_opengl/native/juce_OpenGLExtensions.h b/modules/juce_opengl/native/juce_OpenGLExtensions.h
index 142a4688d..674321c63 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

Loading…
Cancel
Save