Skip to content

Commit

Permalink
Upgrade to juce DEVELOP branch; Fix VST3 Audio Routing (#4779)
Browse files Browse the repository at this point in the history
1. Upgrade to juce develop
2. Use the new getPluginHasMainInput function to route sidechain
   properly in reaper. Closes #4766
  • Loading branch information
baconpaul authored Jul 27, 2021
1 parent a46f389 commit e32b41c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,14 @@ else()
message( STATUS "No JUCE Host Context Support in this version" )
endif()

set(SURGE_JUCE_VST3_EXTENSIONS FALSE)
if(EXISTS ${SURGE_JUCE_LOCATION}/modules/juce_audio_processors/utilities/juce_VST3ClientExtensions.h )
set(SURGE_JUCE_VST3_EXTENSIONS TRUE)
message( STATUS "Including JUCE VST3 Client Extensions")
else()
message( STATUS "No JUCE VST3 Client Extensions" )
endif()


set(JUCE_ASIO_SUPPORT FALSE)
if( BUILD_USING_MY_ASIO_LICENSE )
Expand Down Expand Up @@ -906,6 +914,13 @@ if( BUILD_SURGE_XT )
set( SURGE_JUCE_HOST_CONTEXT_DEFINE 0)
endif()

if (${SURGE_JUCE_VST3_EXTENSIONS})
set( SURGE_JUCE_VST3_EXTENSIONS 1)
else()
set( SURGE_JUCE_VST3_EXTENSIONS 0)
endif()


target_compile_definitions(surge-xt PUBLIC
JUCE_ALLOW_STATIC_NULL_VARIABLES=0
JUCE_STRICT_REFCOUNTEDPOINTER=1
Expand All @@ -930,6 +945,7 @@ if( BUILD_SURGE_XT )

SURGE_JUCE_ACCESSIBLE=${SURGE_JUCE_ACCESSIBLE_DEFINE}
SURGE_JUCE_HOST_CONTEXT=${SURGE_JUCE_HOST_CONTEXT_DEFINE}
SURGE_JUCE_VST3_EXTENSIONS=${SURGE_JUCE_VST3_EXTENSIONS}

TARGET_JUCE_SYNTH=1
TARGET_HEADLESS=1
Expand Down
2 changes: 1 addition & 1 deletion libs/JUCE
Submodule JUCE updated 1158 files
8 changes: 8 additions & 0 deletions src/surge_synth_juce/SurgeSynthProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ struct SurgeMacroToJuceParamAdapter : public juce::RangedAudioParameter
};

class SurgeSynthProcessor : public juce::AudioProcessor,
#if SURGE_JUCE_VST3_EXTENSIONS
public juce::VST3ClientExtensions,
#endif
public SurgeSynthesizer::PluginLayer,
public juce::MidiKeyboardState::Listener

{
public:
//==============================================================================
Expand Down Expand Up @@ -209,6 +213,10 @@ class SurgeSynthProcessor : public juce::AudioProcessor,
std::string paramClumpName(int clumpid);
juce::MidiKeyboardState midiKeyboardState;

#if SURGE_JUCE_VST3_EXTENSIONS
bool getPluginHasMainInput() const override { return false; }
#endif

private:
std::vector<SurgeParamToJuceParamAdapter *> paramAdapters;

Expand Down

0 comments on commit e32b41c

Please sign in to comment.