mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
DSP: Fix compiler warnings in DSP plugin demo
This commit is contained in:
parent
1e71c07a49
commit
02bbe31c0d
1 changed files with 33 additions and 37 deletions
|
|
@ -33,7 +33,7 @@
|
|||
juce_audio_plugin_client, juce_audio_processors,
|
||||
juce_audio_utils, juce_core, juce_data_structures, juce_dsp,
|
||||
juce_events, juce_graphics, juce_gui_basics, juce_gui_extra
|
||||
exporters: xcode_mac, vs2019
|
||||
exporters: xcode_mac, vs2019, linux_make
|
||||
|
||||
moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1
|
||||
|
||||
|
|
@ -127,8 +127,6 @@ public:
|
|||
cabinetType.set (0);
|
||||
}
|
||||
|
||||
~DspModulePluginDemoAudioProcessor() {}
|
||||
|
||||
//==============================================================================
|
||||
bool isBusesLayoutSupported (const BusesLayout& layouts) const override
|
||||
{
|
||||
|
|
@ -317,21 +315,21 @@ private:
|
|||
//==============================================================================
|
||||
DspModulePluginDemoAudioProcessorEditor (DspModulePluginDemoAudioProcessor& p)
|
||||
: AudioProcessorEditor (&p),
|
||||
processor (p),
|
||||
inputVolumeLabel ({}, processor.inputVolumeParam->name),
|
||||
outputVolumeLabel ({}, processor.outputVolumeParam->name),
|
||||
lowPassFilterFreqLabel ({}, processor.lowPassFilterFreqParam->name),
|
||||
highPassFilterFreqLabel ({}, processor.highPassFilterFreqParam->name),
|
||||
stereoLabel ({}, processor.stereoParam->name),
|
||||
slopeLabel ({}, processor.slopeParam->name),
|
||||
waveshaperLabel ({}, processor.waveshaperParam->name),
|
||||
cabinetTypeLabel ({}, processor.cabinetTypeParam->name)
|
||||
dspProcessor (p),
|
||||
inputVolumeLabel ({}, dspProcessor.inputVolumeParam->name),
|
||||
outputVolumeLabel ({}, dspProcessor.outputVolumeParam->name),
|
||||
lowPassFilterFreqLabel ({}, dspProcessor.lowPassFilterFreqParam->name),
|
||||
highPassFilterFreqLabel ({}, dspProcessor.highPassFilterFreqParam->name),
|
||||
stereoLabel ({}, dspProcessor.stereoParam->name),
|
||||
slopeLabel ({}, dspProcessor.slopeParam->name),
|
||||
waveshaperLabel ({}, dspProcessor.waveshaperParam->name),
|
||||
cabinetTypeLabel ({}, dspProcessor.cabinetTypeParam->name)
|
||||
{
|
||||
//==============================================================================
|
||||
inputVolumeSlider .reset (new ParameterSlider (*processor.inputVolumeParam));
|
||||
outputVolumeSlider .reset (new ParameterSlider (*processor.outputVolumeParam));
|
||||
lowPassFilterFreqSlider .reset (new ParameterSlider (*processor.lowPassFilterFreqParam));
|
||||
highPassFilterFreqSlider.reset (new ParameterSlider (*processor.highPassFilterFreqParam));
|
||||
inputVolumeSlider .reset (new ParameterSlider (*dspProcessor.inputVolumeParam));
|
||||
outputVolumeSlider .reset (new ParameterSlider (*dspProcessor.outputVolumeParam));
|
||||
lowPassFilterFreqSlider .reset (new ParameterSlider (*dspProcessor.lowPassFilterFreqParam));
|
||||
highPassFilterFreqSlider.reset (new ParameterSlider (*dspProcessor.highPassFilterFreqParam));
|
||||
|
||||
addAndMakeVisible (inputVolumeSlider .get());
|
||||
addAndMakeVisible (outputVolumeSlider .get());
|
||||
|
|
@ -358,11 +356,11 @@ private:
|
|||
addAndMakeVisible (stereoBox);
|
||||
|
||||
auto i = 1;
|
||||
for (auto choice : processor.stereoParam->choices)
|
||||
for (auto choice : dspProcessor.stereoParam->choices)
|
||||
stereoBox.addItem (choice, i++);
|
||||
|
||||
stereoBox.onChange = [this] { processor.stereoParam->operator= (stereoBox.getSelectedItemIndex()); };
|
||||
stereoBox.setSelectedId (processor.stereoParam->getIndex() + 1);
|
||||
stereoBox.onChange = [this] { dspProcessor.stereoParam->operator= (stereoBox.getSelectedItemIndex()); };
|
||||
stereoBox.setSelectedId (dspProcessor.stereoParam->getIndex() + 1);
|
||||
|
||||
addAndMakeVisible (stereoLabel);
|
||||
stereoLabel.setJustificationType (Justification::centredLeft);
|
||||
|
|
@ -372,11 +370,11 @@ private:
|
|||
addAndMakeVisible(slopeBox);
|
||||
|
||||
i = 1;
|
||||
for (auto choice : processor.slopeParam->choices)
|
||||
for (auto choice : dspProcessor.slopeParam->choices)
|
||||
slopeBox.addItem(choice, i++);
|
||||
|
||||
slopeBox.onChange = [this] { processor.slopeParam->operator= (slopeBox.getSelectedItemIndex()); };
|
||||
slopeBox.setSelectedId(processor.slopeParam->getIndex() + 1);
|
||||
slopeBox.onChange = [this] { dspProcessor.slopeParam->operator= (slopeBox.getSelectedItemIndex()); };
|
||||
slopeBox.setSelectedId(dspProcessor.slopeParam->getIndex() + 1);
|
||||
|
||||
addAndMakeVisible(slopeLabel);
|
||||
slopeLabel.setJustificationType(Justification::centredLeft);
|
||||
|
|
@ -386,11 +384,11 @@ private:
|
|||
addAndMakeVisible (waveshaperBox);
|
||||
|
||||
i = 1;
|
||||
for (auto choice : processor.waveshaperParam->choices)
|
||||
for (auto choice : dspProcessor.waveshaperParam->choices)
|
||||
waveshaperBox.addItem (choice, i++);
|
||||
|
||||
waveshaperBox.onChange = [this] { processor.waveshaperParam->operator= (waveshaperBox.getSelectedItemIndex()); };
|
||||
waveshaperBox.setSelectedId (processor.waveshaperParam->getIndex() + 1);
|
||||
waveshaperBox.onChange = [this] { dspProcessor.waveshaperParam->operator= (waveshaperBox.getSelectedItemIndex()); };
|
||||
waveshaperBox.setSelectedId (dspProcessor.waveshaperParam->getIndex() + 1);
|
||||
|
||||
addAndMakeVisible (waveshaperLabel);
|
||||
waveshaperLabel.setJustificationType (Justification::centredLeft);
|
||||
|
|
@ -400,11 +398,11 @@ private:
|
|||
addAndMakeVisible (cabinetTypeBox);
|
||||
|
||||
i = 1;
|
||||
for (auto choice : processor.cabinetTypeParam->choices)
|
||||
for (auto choice : dspProcessor.cabinetTypeParam->choices)
|
||||
cabinetTypeBox.addItem (choice, i++);
|
||||
|
||||
cabinetTypeBox.onChange = [this] { processor.cabinetTypeParam->operator= (cabinetTypeBox.getSelectedItemIndex()); };
|
||||
cabinetTypeBox.setSelectedId (processor.cabinetTypeParam->getIndex() + 1);
|
||||
cabinetTypeBox.onChange = [this] { dspProcessor.cabinetTypeParam->operator= (cabinetTypeBox.getSelectedItemIndex()); };
|
||||
cabinetTypeBox.setSelectedId (dspProcessor.cabinetTypeParam->getIndex() + 1);
|
||||
|
||||
addAndMakeVisible (cabinetTypeLabel);
|
||||
cabinetTypeLabel.setJustificationType (Justification::centredLeft);
|
||||
|
|
@ -412,21 +410,19 @@ private:
|
|||
|
||||
//==============================================================================
|
||||
addAndMakeVisible (cabinetSimButton);
|
||||
cabinetSimButton.onClick = [this] { processor.cabinetSimParam->operator= (cabinetSimButton.getToggleState()); };
|
||||
cabinetSimButton.setButtonText (processor.cabinetSimParam->name);
|
||||
cabinetSimButton.setToggleState (processor.cabinetSimParam->get(), NotificationType::dontSendNotification);
|
||||
cabinetSimButton.onClick = [this] { dspProcessor.cabinetSimParam->operator= (cabinetSimButton.getToggleState()); };
|
||||
cabinetSimButton.setButtonText (dspProcessor.cabinetSimParam->name);
|
||||
cabinetSimButton.setToggleState (dspProcessor.cabinetSimParam->get(), NotificationType::dontSendNotification);
|
||||
|
||||
addAndMakeVisible (oversamplingButton);
|
||||
oversamplingButton.onClick = [this] { processor.oversamplingParam->operator= (oversamplingButton.getToggleState()); };
|
||||
oversamplingButton.setButtonText (processor.oversamplingParam->name);
|
||||
oversamplingButton.setToggleState (processor.oversamplingParam->get(), NotificationType::dontSendNotification);
|
||||
oversamplingButton.onClick = [this] { dspProcessor.oversamplingParam->operator= (oversamplingButton.getToggleState()); };
|
||||
oversamplingButton.setButtonText (dspProcessor.oversamplingParam->name);
|
||||
oversamplingButton.setToggleState (dspProcessor.oversamplingParam->get(), NotificationType::dontSendNotification);
|
||||
|
||||
//==============================================================================
|
||||
setSize (600, 400);
|
||||
}
|
||||
|
||||
~DspModulePluginDemoAudioProcessorEditor() {}
|
||||
|
||||
//==============================================================================
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
|
|
@ -479,7 +475,7 @@ private:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
DspModulePluginDemoAudioProcessor& processor;
|
||||
DspModulePluginDemoAudioProcessor& dspProcessor;
|
||||
|
||||
std::unique_ptr<ParameterSlider> inputVolumeSlider, outputVolumeSlider,
|
||||
lowPassFilterFreqSlider, highPassFilterFreqSlider;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue