Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update juce6 for nogui/embed fixes
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jul 12, 2022
1 parent d500be0 commit 2697c5d
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 12 deletions.
Expand Up @@ -71,7 +71,9 @@
#define JUCE_LV2_STATE_STRING_URI "urn:juce:stateString"
#define JUCE_LV2_STATE_BINARY_URI "urn:juce:stateBinary"

#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
#endif

#include "../utility/juce_IncludeModuleHeaders.h"

Expand Down
Expand Up @@ -174,7 +174,7 @@ static const String makePluginFile (AudioProcessor* const filter, const int maxN

// Plugin
text += "<" + pluginURI + ">\n";
text += " a " + getPluginType() + " ;\n";
text += " a " + getPluginType() + " , doap:Project ;\n";
text += " lv2:requiredFeature <" LV2_BUF_SIZE__boundedBlockLength "> ,\n";
#if JucePlugin_WantsLV2FixedBlockSize
text += " <" LV2_BUF_SIZE__fixedBlockLength "> ,\n";
Expand All @@ -193,8 +193,8 @@ static const String makePluginFile (AudioProcessor* const filter, const int maxN
const uint32_t version = JucePlugin_VersionCode;

const uint32_t majorVersion = (version & 0xFF0000) >> 16;
const uint32_t microVersion = (version & 0x00FF00) >> 8;
/* */ uint32_t minorVersion = (version & 0x0000FF) >> 0;
/* */ uint32_t minorVersion = (version & 0x00FF00) >> 8;
const uint32_t microVersion = (version & 0x0000FF) >> 0;

// NOTE: LV2 ignores 'major' version and says 0 for minor is pre-release/unstable.
if (majorVersion > 0)
Expand Down
Expand Up @@ -243,16 +243,25 @@ struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewCompone
#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"
#include "utilities/juce_AudioParameterFloat.cpp"
#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
Expand Up @@ -115,15 +115,21 @@
#endif

//==============================================================================
#include "processors/juce_AudioProcessorEditor.h"
#if JUCE_AUDIOPROCESSOR_NO_GUI
namespace juce { class AudioProcessor; }
#else
#include "processors/juce_AudioProcessorEditor.h"
#endif
#include "processors/juce_AudioProcessorListener.h"
#include "processors/juce_AudioProcessorParameter.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"
Expand All @@ -140,6 +146,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"
Expand Up @@ -1228,7 +1228,9 @@ class JUCE_API AudioProcessor
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
};
Expand Down
Expand Up @@ -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,
Expand Down Expand Up @@ -516,6 +517,7 @@ AudioProcessorValueTreeState::ButtonAttachment::ButtonAttachment (AudioProcessor
: attachment (makeAttachment<ButtonParameterAttachment> (stateToUse, parameterID, button))
{
}
#endif

//==============================================================================
//==============================================================================
Expand Down
Expand Up @@ -429,6 +429,7 @@ class JUCE_API AudioProcessorValueTreeState : private Timer,
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.
Expand Down Expand Up @@ -496,6 +497,7 @@ class JUCE_API AudioProcessorValueTreeState : private Timer,
std::unique_ptr<ButtonParameterAttachment> attachment;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment)
};
#endif

private:
//==============================================================================
Expand Down
Expand Up @@ -70,6 +70,7 @@ bool PluginHostType::isInAAXAudioSuite (AudioProcessor& processor)
return false;
}

#if ! JUCE_AUDIOPROCESSOR_NO_GUI
Image PluginHostType::getHostIcon (int size) const
{
ignoreUnused (size);
Expand All @@ -86,6 +87,7 @@ Image PluginHostType::getHostIcon (int size) const

return Image();
}
#endif

const char* PluginHostType::getHostDescription() const noexcept
{
Expand Down
Expand Up @@ -202,8 +202,10 @@ class PluginHostType
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. */
Expand Down
Expand Up @@ -84,7 +84,7 @@
the availability of Xinerama is queried during runtime.
*/
#ifndef JUCE_USE_XINERAMA
#define JUCE_USE_XINERAMA 1
#define JUCE_USE_XINERAMA 0
#endif

/** Config: JUCE_USE_XSHM
Expand Down

0 comments on commit 2697c5d

Please sign in to comment.