Signed-off-by: falkTX <falktx@falktx.com>v7.0.9-distrho
| @@ -34,6 +34,7 @@ struct PluginUtilities | |||||
| { | { | ||||
| PluginUtilities() = delete; | PluginUtilities() = delete; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| static int getDesktopFlags (const AudioProcessorEditor& editor) | static int getDesktopFlags (const AudioProcessorEditor& editor) | ||||
| { | { | ||||
| return editor.wantsLayerBackedView() | return editor.wantsLayerBackedView() | ||||
| @@ -50,6 +51,7 @@ struct PluginUtilities | |||||
| { | { | ||||
| editor.addToDesktop (getDesktopFlags (editor), parent); | editor.addToDesktop (getDesktopFlags (editor), parent); | ||||
| } | } | ||||
| #endif | |||||
| static const PluginHostType& getHostType() | static const PluginHostType& getHostType() | ||||
| { | { | ||||
| @@ -40,7 +40,9 @@ | |||||
| #include <juce_audio_plugin_client/juce_audio_plugin_client.h> | #include <juce_audio_plugin_client/juce_audio_plugin_client.h> | ||||
| #include <juce_audio_plugin_client/detail/juce_CheckSettingMacros.h> | #include <juce_audio_plugin_client/detail/juce_CheckSettingMacros.h> | ||||
| #include <juce_audio_plugin_client/detail/juce_PluginUtilities.h> | #include <juce_audio_plugin_client/detail/juce_PluginUtilities.h> | ||||
| #include <juce_audio_plugin_client/detail/juce_LinuxMessageThread.h> | |||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| #include <juce_audio_plugin_client/detail/juce_LinuxMessageThread.h> | |||||
| #endif | |||||
| #include <juce_audio_processors/utilities/juce_FlagCache.h> | #include <juce_audio_processors/utilities/juce_FlagCache.h> | ||||
| #include <juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp> | #include <juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp> | ||||
| @@ -728,6 +730,7 @@ public: | |||||
| return LV2_STATE_SUCCESS; | return LV2_STATE_SUCCESS; | ||||
| } | } | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| std::unique_ptr<AudioProcessorEditor> createEditor() | std::unique_ptr<AudioProcessorEditor> createEditor() | ||||
| { | { | ||||
| return std::unique_ptr<AudioProcessorEditor> (processor->createEditorIfNeeded()); | return std::unique_ptr<AudioProcessorEditor> (processor->createEditorIfNeeded()); | ||||
| @@ -737,6 +740,7 @@ public: | |||||
| { | { | ||||
| processor->editorBeingDeleted (editor); | processor->editorBeingDeleted (editor); | ||||
| } | } | ||||
| #endif | |||||
| static std::unique_ptr<AudioProcessor> createProcessorInstance() | static std::unique_ptr<AudioProcessor> createProcessorInstance() | ||||
| { | { | ||||
| @@ -794,7 +798,7 @@ private: | |||||
| ScopedJuceInitialiser_GUI scopedJuceInitialiser; | ScopedJuceInitialiser_GUI scopedJuceInitialiser; | ||||
| #if JUCE_LINUX || JUCE_BSD | |||||
| #if (JUCE_LINUX || JUCE_BSD) && ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| SharedResourcePointer<detail::MessageThread> messageThread; | SharedResourcePointer<detail::MessageThread> messageThread; | ||||
| #endif | #endif | ||||
| @@ -893,6 +897,7 @@ private: | |||||
| "\tlv2:binary <" << URL::addEscapeChars (libraryPath.getFileName(), false) << "> ;\n" | "\tlv2:binary <" << URL::addEscapeChars (libraryPath.getFileName(), false) << "> ;\n" | ||||
| "\trdfs:seeAlso <dsp.ttl> .\n"; | "\trdfs:seeAlso <dsp.ttl> .\n"; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| if (proc.hasEditor()) | if (proc.hasEditor()) | ||||
| { | { | ||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| @@ -912,6 +917,7 @@ private: | |||||
| "\trdfs:seeAlso <ui.ttl> .\n" | "\trdfs:seeAlso <ui.ttl> .\n" | ||||
| "\n"; | "\n"; | ||||
| } | } | ||||
| #endif | |||||
| for (auto i = 0, end = proc.getNumPrograms(); i < end; ++i) | for (auto i = 0, end = proc.getNumPrograms(); i < end; ++i) | ||||
| { | { | ||||
| @@ -1144,8 +1150,10 @@ private: | |||||
| os << "<" JucePlugin_LV2URI ">\n"; | os << "<" JucePlugin_LV2URI ">\n"; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| if (proc.hasEditor()) | if (proc.hasEditor()) | ||||
| os << "\tui:ui <" << JucePluginLV2UriUi << "> ;\n"; | os << "\tui:ui <" << JucePluginLV2UriUi << "> ;\n"; | ||||
| #endif | |||||
| const auto versionParts = StringArray::fromTokens (JucePlugin_VersionString, ".", ""); | const auto versionParts = StringArray::fromTokens (JucePlugin_VersionString, ".", ""); | ||||
| @@ -1349,6 +1357,7 @@ private: | |||||
| static Result writeUiTtl (AudioProcessor& proc, const File& libraryPath) | static Result writeUiTtl (AudioProcessor& proc, const File& libraryPath) | ||||
| { | { | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| if (! proc.hasEditor()) | if (! proc.hasEditor()) | ||||
| return Result::ok(); | return Result::ok(); | ||||
| @@ -1390,6 +1399,7 @@ private: | |||||
| "\topts:supportedOption\n" | "\topts:supportedOption\n" | ||||
| "\t\tui:scaleFactor ,\n" | "\t\tui:scaleFactor ,\n" | ||||
| "\t\tparam:sampleRate .\n"; | "\t\tparam:sampleRate .\n"; | ||||
| #endif | |||||
| return Result::ok(); | return Result::ok(); | ||||
| } | } | ||||
| @@ -1516,6 +1526,7 @@ static Optional<float> findScaleFactor (const LV2_URID_Map* symap, const LV2_Opt | |||||
| return parser.parseNumericOption<float> (scaleFactorOption); | return parser.parseNumericOption<float> (scaleFactorOption); | ||||
| } | } | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| class LV2UIInstance final : private Component, | class LV2UIInstance final : private Component, | ||||
| private ComponentListener | private ComponentListener | ||||
| { | { | ||||
| @@ -1828,6 +1839,7 @@ LV2_SYMBOL_EXPORT const LV2UI_Descriptor* lv2ui_descriptor (uint32_t index) | |||||
| return &descriptor; | return &descriptor; | ||||
| } | } | ||||
| #endif | |||||
| } // namespace juce::lv2_client | } // namespace juce::lv2_client | ||||
| @@ -34,7 +34,9 @@ | |||||
| #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 | #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 | ||||
| #define JUCE_CORE_INCLUDE_OBJC_HELPERS 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_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER 1 | ||||
| #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1 | #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1 | ||||
| @@ -42,7 +44,7 @@ | |||||
| #include <juce_gui_extra/juce_gui_extra.h> | #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 | |||||
| JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wvariadic-macros") | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wvariadic-macros") | ||||
| #include <X11/Xlib.h> | #include <X11/Xlib.h> | ||||
| JUCE_END_IGNORE_WARNINGS_GCC_LIKE | JUCE_END_IGNORE_WARNINGS_GCC_LIKE | ||||
| @@ -197,9 +199,11 @@ private: | |||||
| #include "format_types/juce_LegacyAudioParameter.cpp" | #include "format_types/juce_LegacyAudioParameter.cpp" | ||||
| #include "processors/juce_AudioProcessor.cpp" | #include "processors/juce_AudioProcessor.cpp" | ||||
| #include "processors/juce_AudioPluginInstance.cpp" | #include "processors/juce_AudioPluginInstance.cpp" | ||||
| #include "processors/juce_AudioProcessorEditor.cpp" | |||||
| #include "processors/juce_AudioProcessorGraph.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 "processors/juce_PluginDescription.cpp" | ||||
| #include "format_types/juce_ARACommon.cpp" | #include "format_types/juce_ARACommon.cpp" | ||||
| #include "format_types/juce_LADSPAPluginFormat.cpp" | #include "format_types/juce_LADSPAPluginFormat.cpp" | ||||
| @@ -207,9 +211,11 @@ private: | |||||
| #include "format_types/juce_VST3PluginFormat.cpp" | #include "format_types/juce_VST3PluginFormat.cpp" | ||||
| #include "format_types/juce_AudioUnitPluginFormat.mm" | #include "format_types/juce_AudioUnitPluginFormat.mm" | ||||
| #include "format_types/juce_ARAHosting.cpp" | #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 "processors/juce_AudioProcessorParameterGroup.cpp" | ||||
| #include "utilities/juce_AudioProcessorParameterWithID.cpp" | #include "utilities/juce_AudioProcessorParameterWithID.cpp" | ||||
| #include "utilities/juce_RangedAudioParameter.cpp" | #include "utilities/juce_RangedAudioParameter.cpp" | ||||
| @@ -217,7 +223,9 @@ private: | |||||
| #include "utilities/juce_AudioParameterInt.cpp" | #include "utilities/juce_AudioParameterInt.cpp" | ||||
| #include "utilities/juce_AudioParameterBool.cpp" | #include "utilities/juce_AudioParameterBool.cpp" | ||||
| #include "utilities/juce_AudioParameterChoice.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_AudioProcessorValueTreeState.cpp" | ||||
| #include "utilities/juce_PluginHostType.cpp" | #include "utilities/juce_PluginHostType.cpp" | ||||
| #include "utilities/juce_NativeScaleFactorNotifier.cpp" | #include "utilities/juce_NativeScaleFactorNotifier.cpp" | ||||
| @@ -236,3 +244,8 @@ private: | |||||
| #include "format_types/juce_LV2PluginFormat_test.cpp" | #include "format_types/juce_LV2PluginFormat_test.cpp" | ||||
| #endif | #endif | ||||
| #endif | #endif | ||||
| #if JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| // commonly used classes in DSP code | |||||
| namespace juce { Colour::Colour(juce::uint32) noexcept {} } | |||||
| #endif | |||||
| @@ -139,14 +139,18 @@ | |||||
| #include "processors/juce_AudioProcessorParameter.h" | #include "processors/juce_AudioProcessorParameter.h" | ||||
| #include "processors/juce_HostedAudioProcessorParameter.h" | #include "processors/juce_HostedAudioProcessorParameter.h" | ||||
| #include "processors/juce_AudioProcessorEditorHostContext.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_AudioProcessorListener.h" | ||||
| #include "processors/juce_AudioProcessorParameterGroup.h" | #include "processors/juce_AudioProcessorParameterGroup.h" | ||||
| #include "processors/juce_AudioProcessor.h" | #include "processors/juce_AudioProcessor.h" | ||||
| #include "processors/juce_PluginDescription.h" | #include "processors/juce_PluginDescription.h" | ||||
| #include "processors/juce_AudioPluginInstance.h" | #include "processors/juce_AudioPluginInstance.h" | ||||
| #include "processors/juce_AudioProcessorGraph.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_AudioPluginFormat.h" | ||||
| #include "format/juce_AudioPluginFormatManager.h" | #include "format/juce_AudioPluginFormatManager.h" | ||||
| #include "scanning/juce_KnownPluginList.h" | #include "scanning/juce_KnownPluginList.h" | ||||
| @@ -165,7 +169,9 @@ | |||||
| #include "utilities/juce_AudioParameterInt.h" | #include "utilities/juce_AudioParameterInt.h" | ||||
| #include "utilities/juce_AudioParameterBool.h" | #include "utilities/juce_AudioParameterBool.h" | ||||
| #include "utilities/juce_AudioParameterChoice.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_AudioProcessorValueTreeState.h" | ||||
| #include "utilities/juce_PluginHostType.h" | #include "utilities/juce_PluginHostType.h" | ||||
| #include "utilities/ARA/juce_ARADebug.h" | #include "utilities/ARA/juce_ARADebug.h" | ||||
| @@ -50,12 +50,14 @@ AudioProcessor::AudioProcessor (const BusesProperties& ioConfig) | |||||
| AudioProcessor::~AudioProcessor() | AudioProcessor::~AudioProcessor() | ||||
| { | { | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| { | { | ||||
| const ScopedLock sl (activeEditorLock); | const ScopedLock sl (activeEditorLock); | ||||
| // ooh, nasty - the editor should have been deleted before its AudioProcessor. | // ooh, nasty - the editor should have been deleted before its AudioProcessor. | ||||
| jassert (activeEditor == nullptr); | jassert (activeEditor == nullptr); | ||||
| } | } | ||||
| #endif | |||||
| #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING | #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING | ||||
| // This will fail if you've called beginParameterChangeGesture() for one | // This will fail if you've called beginParameterChangeGesture() for one | ||||
| @@ -868,6 +870,7 @@ void AudioProcessor::audioIOChanged (bool busNumberChanged, bool channelNumChang | |||||
| processorLayoutsChanged(); | processorLayoutsChanged(); | ||||
| } | } | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| //============================================================================== | //============================================================================== | ||||
| void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) noexcept | void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) noexcept | ||||
| { | { | ||||
| @@ -904,6 +907,7 @@ AudioProcessorEditor* AudioProcessor::createEditorIfNeeded() | |||||
| return ed; | return ed; | ||||
| } | } | ||||
| #endif | |||||
| //============================================================================== | //============================================================================== | ||||
| void AudioProcessor::getCurrentProgramStateInformation (juce::MemoryBlock& destData) | void AudioProcessor::getCurrentProgramStateInformation (juce::MemoryBlock& destData) | ||||
| @@ -959,6 +959,7 @@ public: | |||||
| */ | */ | ||||
| virtual void setNonRealtime (bool isNonRealtime) noexcept; | virtual void setNonRealtime (bool isNonRealtime) noexcept; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Creates the processor's GUI. | /** Creates the processor's GUI. | ||||
| @@ -1008,6 +1009,7 @@ public: | |||||
| This may call createEditor() internally to create the component. | This may call createEditor() internally to create the component. | ||||
| */ | */ | ||||
| AudioProcessorEditor* createEditorIfNeeded(); | AudioProcessorEditor* createEditorIfNeeded(); | ||||
| #endif | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns the default number of steps for a parameter. | /** Returns the default number of steps for a parameter. | ||||
| @@ -1241,9 +1243,11 @@ public: | |||||
| virtual CurveData getResponseCurve (CurveData::Type /*curveType*/) const { return {}; } | 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. */ | /** Not for public use - this is called before deleting an editor component. */ | ||||
| void editorBeingDeleted (AudioProcessorEditor*) noexcept; | void editorBeingDeleted (AudioProcessorEditor*) noexcept; | ||||
| #endif | |||||
| /** Flags to indicate the type of plugin context in which a processor is being used. */ | /** Flags to indicate the type of plugin context in which a processor is being used. */ | ||||
| enum WrapperType | enum WrapperType | ||||
| @@ -1273,7 +1277,9 @@ public: | |||||
| struct TrackProperties | struct TrackProperties | ||||
| { | { | ||||
| String name; // The name of the track - this will be empty if the track name is not known | 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 | 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 | // other properties may be added in the future | ||||
| }; | }; | ||||
| @@ -1522,7 +1528,9 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| Array<AudioProcessorListener*> listeners; | Array<AudioProcessorListener*> listeners; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| Component::SafePointer<AudioProcessorEditor> activeEditor; | Component::SafePointer<AudioProcessorEditor> activeEditor; | ||||
| #endif | |||||
| double currentSampleRate = 0; | double currentSampleRate = 0; | ||||
| int blockSize = 0, latencySamples = 0; | int blockSize = 0, latencySamples = 0; | ||||
| bool suspended = false; | bool suspended = false; | ||||
| @@ -2071,8 +2071,10 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::producesMidi() const | |||||
| bool AudioProcessorGraph::AudioGraphIOProcessor::isInput() const noexcept { return type == audioInputNode || type == midiInputNode; } | bool AudioProcessorGraph::AudioGraphIOProcessor::isInput() const noexcept { return type == audioInputNode || type == midiInputNode; } | ||||
| bool AudioProcessorGraph::AudioGraphIOProcessor::isOutput() const noexcept { return type == audioOutputNode || type == midiOutputNode; } | bool AudioProcessorGraph::AudioGraphIOProcessor::isOutput() const noexcept { return type == audioOutputNode || type == midiOutputNode; } | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const { return false; } | bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const { return false; } | ||||
| AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; } | AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; } | ||||
| #endif | |||||
| int AudioProcessorGraph::AudioGraphIOProcessor::getNumPrograms() { return 0; } | int AudioProcessorGraph::AudioGraphIOProcessor::getNumPrograms() { return 0; } | ||||
| int AudioProcessorGraph::AudioGraphIOProcessor::getCurrentProgram() { return 0; } | int AudioProcessorGraph::AudioGraphIOProcessor::getCurrentProgram() { return 0; } | ||||
| @@ -2249,8 +2251,10 @@ private: | |||||
| double getTailLengthSeconds() const override { return {}; } | double getTailLengthSeconds() const override { return {}; } | ||||
| bool acceptsMidi() const override { return midiIn == MidiIn ::yes; } | bool acceptsMidi() const override { return midiIn == MidiIn ::yes; } | ||||
| bool producesMidi() const override { return midiOut == MidiOut::yes; } | bool producesMidi() const override { return midiOut == MidiOut::yes; } | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| AudioProcessorEditor* createEditor() override { return {}; } | AudioProcessorEditor* createEditor() override { return {}; } | ||||
| bool hasEditor() const override { return {}; } | bool hasEditor() const override { return {}; } | ||||
| #endif | |||||
| int getNumPrograms() override { return 1; } | int getNumPrograms() override { return 1; } | ||||
| int getCurrentProgram() override { return {}; } | int getCurrentProgram() override { return {}; } | ||||
| void setCurrentProgram (int) override {} | void setCurrentProgram (int) override {} | ||||
| @@ -387,8 +387,10 @@ public: | |||||
| bool acceptsMidi() const override; | bool acceptsMidi() const override; | ||||
| bool producesMidi() const override; | bool producesMidi() const override; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| bool hasEditor() const override; | bool hasEditor() const override; | ||||
| AudioProcessorEditor* createEditor() override; | AudioProcessorEditor* createEditor() override; | ||||
| #endif | |||||
| int getNumPrograms() override; | int getNumPrograms() override; | ||||
| int getCurrentProgram() override; | int getCurrentProgram() override; | ||||
| @@ -424,8 +426,10 @@ public: | |||||
| bool acceptsMidi() const override; | bool acceptsMidi() const override; | ||||
| bool producesMidi() const override; | bool producesMidi() const override; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| bool hasEditor() const override { return false; } | bool hasEditor() const override { return false; } | ||||
| AudioProcessorEditor* createEditor() override { return nullptr; } | AudioProcessorEditor* createEditor() override { return nullptr; } | ||||
| #endif | |||||
| int getNumPrograms() override { return 0; } | int getNumPrograms() override { return 0; } | ||||
| int getCurrentProgram() override { return 0; } | int getCurrentProgram() override { return 0; } | ||||
| void setCurrentProgram (int) override { } | void setCurrentProgram (int) override { } | ||||
| @@ -468,6 +468,7 @@ void AudioProcessorValueTreeState::timerCallback() | |||||
| : jlimit (50, 500, getTimerInterval() + 20)); | : jlimit (50, 500, getTimerInterval() + 20)); | ||||
| } | } | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| //============================================================================== | //============================================================================== | ||||
| template <typename Attachment, typename Control> | template <typename Attachment, typename Control> | ||||
| std::unique_ptr<Attachment> makeAttachment (const AudioProcessorValueTreeState& stateToUse, | std::unique_ptr<Attachment> makeAttachment (const AudioProcessorValueTreeState& stateToUse, | ||||
| @@ -501,6 +502,7 @@ AudioProcessorValueTreeState::ButtonAttachment::ButtonAttachment (AudioProcessor | |||||
| : attachment (makeAttachment<ButtonParameterAttachment> (stateToUse, parameterID, button)) | : attachment (makeAttachment<ButtonParameterAttachment> (stateToUse, parameterID, button)) | ||||
| { | { | ||||
| } | } | ||||
| #endif | |||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -528,6 +528,7 @@ public: | |||||
| friend class AudioProcessorValueTreeState::ParameterAdapter; | friend class AudioProcessorValueTreeState::ParameterAdapter; | ||||
| }; | }; | ||||
| #if ! JUCE_AUDIOPROCESSOR_NO_GUI | |||||
| //============================================================================== | //============================================================================== | ||||
| /** An object of this class maintains a connection between a Slider and a parameter | /** An object of this class maintains a connection between a Slider and a parameter | ||||
| in an AudioProcessorValueTreeState. | in an AudioProcessorValueTreeState. | ||||
| @@ -595,6 +596,7 @@ public: | |||||
| std::unique_ptr<ButtonParameterAttachment> attachment; | std::unique_ptr<ButtonParameterAttachment> attachment; | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment) | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment) | ||||
| }; | }; | ||||
| #endif | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||