diff --git a/Source/SosciPluginEditor.cpp b/Source/SosciPluginEditor.cpp index b65a81e..b8d5c38 100644 --- a/Source/SosciPluginEditor.cpp +++ b/Source/SosciPluginEditor.cpp @@ -4,7 +4,9 @@ SosciPluginEditor::SosciPluginEditor(SosciAudioProcessor& p) : CommonPluginEditor(p, "sosci", "sosci", 1180, 750), audioProcessor(p) { initialiseMenuBar(model); - addAndMakeVisible(volume); + if (juce::JUCEApplication::isStandaloneApp()) { + addAndMakeVisible(volume); + } addAndMakeVisible(visualiserSettingsWrapper); BooleanParameter* visualiserFullScreen = audioProcessor.visualiserParameters.visualiserFullScreen; @@ -55,8 +57,10 @@ void SosciPluginEditor::resized() { } else { menuBar.setBounds(area.removeFromTop(25)); - auto volumeArea = area.removeFromLeft(30); - volume.setBounds(volumeArea.withSizeKeepingCentre(volumeArea.getWidth(), juce::jmin(volumeArea.getHeight(), 300))); + if (juce::JUCEApplication::isStandaloneApp()) { + auto volumeArea = area.removeFromLeft(30); + volume.setBounds(volumeArea.withSizeKeepingCentre(volumeArea.getWidth(), juce::jmin(volumeArea.getHeight(), 300))); + } auto settingsArea = area.removeFromRight(juce::jmax(juce::jmin(0.4 * getWidth(), 550.0), 350.0)); visualiserSettings.setSize(settingsArea.getWidth(), VISUALISER_SETTINGS_HEIGHT); @@ -98,7 +102,9 @@ void SosciPluginEditor::visualiserFullScreenChanged() { visualiser.setFullScreen(fullScreen); - volume.setVisible(!fullScreen); + if (juce::JUCEApplication::isStandaloneApp()) { + volume.setVisible(!fullScreen); + } visualiserSettingsWrapper.setVisible(!fullScreen); menuBar.setVisible(!fullScreen); resized(); diff --git a/Source/SosciPluginProcessor.cpp b/Source/SosciPluginProcessor.cpp index 7e5d376..0dccfd5 100644 --- a/Source/SosciPluginProcessor.cpp +++ b/Source/SosciPluginProcessor.cpp @@ -62,14 +62,16 @@ void SosciAudioProcessor::processBlock(juce::AudioBuffer& buffer, juce::M // this is the point that the visualiser will draw threadManager.write(point, "VisualiserComponent"); - point.scale(volume, volume, 1.0); + if (juce::JUCEApplication::isStandaloneApp()) { + point.scale(volume, volume, 1.0); - // clip - point.x = juce::jmax(-threshold, juce::jmin(threshold.load(), point.x)); - point.y = juce::jmax(-threshold, juce::jmin(threshold.load(), point.y)); + // clip + point.x = juce::jmax(-threshold, juce::jmin(threshold.load(), point.x)); + point.y = juce::jmax(-threshold, juce::jmin(threshold.load(), point.y)); - // this is the point that the volume component will draw (i.e. post scale/clipping) - threadManager.write(point, "VolumeComponent"); + // this is the point that the volume component will draw (i.e. post scale/clipping) + threadManager.write(point, "VolumeComponent"); + } if (output.getNumChannels() > 0) { outputArray[0][sample] = point.x;