diff --git a/resources/customComponents/PolarPatternVisualizer.h b/resources/customComponents/PolarPatternVisualizer.h index cd5d37a..02cf746 100644 --- a/resources/customComponents/PolarPatternVisualizer.h +++ b/resources/customComponents/PolarPatternVisualizer.h @@ -77,7 +77,7 @@ class PolarPatternVisualizer : public TextButton { const float deg2rad = static_cast(M_PI / 180.0f); const int degStep = 4; - const int nLookUpSamples = 360; +// const int nLookUpSamples = 360; public: PolarPatternVisualizer() diff --git a/resources/lookAndFeel/AA_LaF.h b/resources/lookAndFeel/AA_LaF.h index 0d4452c..b708ff5 100644 --- a/resources/lookAndFeel/AA_LaF.h +++ b/resources/lookAndFeel/AA_LaF.h @@ -56,27 +56,27 @@ class LaF : public LookAndFeel_V4 { public: - const Colour AAGrey = Colour(180,180,185); +// const Colour AAGrey = Colour(180,180,185); const Colour AARed = Colour(155,35,35); const Colour ClBackground = Colour(0xFF2D2D2D); const Colour ClFace = Colour(0xFFD8D8D8); const Colour ClFaceShadow = Colour(0XFF272727); const Colour ClFaceShadowOutline = Colour(0xFF212121); - const Colour ClFaceShadowOutlineActive = Colour(0xFF7C7C7C); +// const Colour ClFaceShadowOutlineActive = Colour(0xFF7C7C7C); const Colour ClRotSliderArrow = Colour(0xFF4A4A4A); const Colour ClRotSliderArrowShadow = Colour(0x445D5D5D); const Colour ClSliderFace = Colour(0xFF191919); const Colour ClText = Colour(0xFFFFFFFF); const Colour ClTextTextboxbg = Colour(0xFF000000); const Colour ClSeperator = Colour(0xFF979797); - const Colour ClWidgetColours[4] = { - Colour(0xFF00CAFF), Colour(0xFF4FFF00), Colour(0xFFFF9F00), Colour(0xFFD0011B) - }; +// const Colour ClWidgetColours[4] = { +// Colour(0xFF00CAFF), Colour(0xFF4FFF00), Colour(0xFFFF9F00), Colour(0xFFD0011B) +// }; Typeface::Ptr aaLight, aaRegular, aaMedium, terminator; //float sliderThumbDiameter = 14.0f; - float sliderBarSize = 8.0f; +// float sliderBarSize = 8.0f; LaF() { @@ -105,7 +105,7 @@ class LaF : public LookAndFeel_V4 } - ~LaF() override {} + ~LaF() override = default; Typeface::Ptr getTypefaceForFont (const Font& f) override { @@ -232,13 +232,13 @@ class LaF : public LookAndFeel_V4 void drawLabel (Graphics& g, Label& label) override { - float alpha = label.isEnabled() ? 1.0f : 0.4f; + auto alpha = label.isEnabled() ? 1.0f : 0.4f; g.fillAll (label.findColour (Label::backgroundColourId)); Rectangle bounds = label.getLocalBounds(); - float x = (float) bounds.getX(); - float y = (float) bounds.getY(); - float w = (float) bounds.getWidth(); - float h = (float) bounds.getHeight(); + auto x = (float) bounds.getX(); + auto y = (float) bounds.getY(); + auto w = (float) bounds.getWidth(); + auto h = (float) bounds.getHeight(); Path p; p.addRoundedRectangle(x, y, w, h, h/2.0f); g.setColour (ClTextTextboxbg.withMultipliedAlpha(alpha)); @@ -372,7 +372,7 @@ class LaF : public LookAndFeel_V4 g.setColour (header.findColour (TableHeaderComponent::textColourId)); g.setFont (aaRegular); - g.setFont (height * 0.6f); + g.setFont (static_cast (height) * 0.6f); g.drawFittedText (columnName, area, Justification::centred, 1); } @@ -387,7 +387,7 @@ class LaF : public LookAndFeel_V4 if (style == Slider::LinearBar || style == Slider::LinearBarVertical) { - const float fx = (float) x, fy = (float) y, fw = (float) width, fh = (float) height; + const auto fx = (float) x, fy = (float) y, fw = (float) width, fh = (float) height; Path p; @@ -404,7 +404,7 @@ class LaF : public LookAndFeel_V4 g.setColour (baseColour); g.fillPath (p); - const float lineThickness = jmin (15.0f, jmin (width, height) * 0.45f) * 0.1f; + const auto lineThickness = jmin (15.0f, static_cast (jmin (width, height)) * 0.45f) * 0.1f; g.drawRect (slider.getLocalBounds().toFloat(), lineThickness); } else @@ -434,29 +434,29 @@ class LaF : public LookAndFeel_V4 if (slider.isHorizontal()) { - const float iy = y + height * 0.5f - sliderRadius * 0.5f; - Rectangle r (x - sliderRadius * 0.5f, iy, width + sliderRadius, sliderRadius); - slbg.addRoundedRectangle (r,sliderRadius/2.0,sliderRadius/2.0); + const auto iy = static_cast (static_cast (y) + static_cast (height) * 0.5f - sliderRadius * 0.5f); + Rectangle r (static_cast (static_cast (x) - sliderRadius * 0.5f), iy, static_cast (static_cast (width) + sliderRadius), sliderRadius); + slbg.addRoundedRectangle (r,static_cast (sliderRadius/2.0),static_cast (sliderRadius/2.0)); if (isTwoValue) { clbar.addRoundedRectangle( Rectangle(Point(minSliderPos, iy), Point(maxSliderPos, iy+sliderRadius)), - sliderRadius/2.0,sliderRadius/2.0); + static_cast (sliderRadius/2.0),static_cast (sliderRadius/2.0)); } else { clbar.addRoundedRectangle( Rectangle(Point(static_cast (x + width * (zeroPos)), iy), Point(sliderPos, iy+sliderRadius)), - sliderRadius/2.0,sliderRadius/2.0); + static_cast (sliderRadius/2.0),static_cast (sliderRadius/2.0)); } } else { - const float ix = x + width * 0.5f - sliderRadius * 0.5f; - Rectangle r (ix, y - sliderRadius * 0.5f, sliderRadius, height + sliderRadius); - slbg.addRoundedRectangle (r,sliderRadius/2.0,sliderRadius/2.0); - clbar.addRoundedRectangle(Rectangle(Point(ix+1.0f, static_cast (y + height * (1.0f - zeroPos))), Point(ix-1.0f+sliderRadius,sliderPos)),sliderRadius/2.0,sliderRadius/2.0); + const auto ix = static_cast (static_cast (x) + static_cast (width) * 0.5f - sliderRadius * 0.5f); + Rectangle r (ix, static_cast (y) - sliderRadius * 0.5f, sliderRadius, static_cast (height) + sliderRadius); + slbg.addRoundedRectangle (r,static_cast (sliderRadius/2.0),static_cast (sliderRadius/2.0)); + clbar.addRoundedRectangle(Rectangle(Point(ix+1.0f, static_cast (y + height * (1.0f - zeroPos))), Point(ix-1.0f+sliderRadius,sliderPos)),static_cast (sliderRadius/2.0),static_cast (sliderRadius/2.0)); } @@ -485,15 +485,15 @@ class LaF : public LookAndFeel_V4 { bool isEnabled = slider.isEnabled(); const float alpha = isEnabled ? 1.0f : 0.4f; - const float radius = jmin (width / 2, height / 2); - const float centreX = x + width * 0.5f; - const float centreY = y + height * 0.5f; + const auto radius = static_cast (jmin (width / 2, height / 2)); + const float centreX = static_cast (x) + static_cast (width) * 0.5f; + const float centreY = static_cast (y) + static_cast (height) * 0.5f; const float rx = centreX - radius; const float ry = centreY - radius; const float rw = radius * 2.0f; - const float min = static_cast (slider.getMinimum()); - const float max = static_cast (slider.getMaximum()); + const auto min = static_cast (slider.getMinimum()); + const auto max = static_cast (slider.getMaximum()); const float zeroPos = -min/(max-min); const float zeroAngle =rotaryStartAngle + zeroPos * (rotaryEndAngle - rotaryStartAngle); const float angle = rotaryStartAngle + sliderPos * (rotaryEndAngle - rotaryStartAngle); @@ -571,13 +571,13 @@ class LaF : public LookAndFeel_V4 if (style == Slider::LinearVertical) { - kx = x + width * 0.5f; + kx = static_cast (x + width) * 0.5f; ky = sliderPos; } else { kx = sliderPos; - ky = y + height * 0.5f; + ky = static_cast(y + height) * 0.5f; } @@ -591,13 +591,13 @@ class LaF : public LookAndFeel_V4 else if (style == Slider::TwoValueVertical) { drawRoundThumb (g, - jmax (sliderRadius, x + width * 0.5f), + jmax (sliderRadius, static_cast(x + width) * 0.5f), minSliderPos, sliderRadius * 2.0f, knobColour, outlineThickness); drawRoundThumb (g, - jmax (sliderRadius, x + width * 0.5f), + jmax (sliderRadius, static_cast(x + width) * 0.5f), maxSliderPos, sliderRadius * 2.0f, knobColour, outlineThickness); @@ -606,13 +606,13 @@ class LaF : public LookAndFeel_V4 { drawRoundThumb (g, minSliderPos, - jmax (sliderRadius, y + height * 0.5f), + jmax (sliderRadius, static_cast(y + height) * 0.5f), sliderRadius * 2.0f, knobColour, outlineThickness); drawRoundThumb (g, maxSliderPos, - jmax (sliderRadius, y + height * 0.5f), + jmax (sliderRadius, static_cast(y + height) * 0.5f), sliderRadius * 2.0f, knobColour, outlineThickness); @@ -656,7 +656,7 @@ class LaF : public LookAndFeel_V4 void drawButtonBackground (Graphics& g, Button& button, const Colour& backgroundColour, bool isMouseOverButton, bool isButtonDown) override { - Rectangle buttonArea(0.0f, 0.0f, button.getWidth(), button.getHeight()); + Rectangle buttonArea(0.0f, 0.0f, static_cast (button.getWidth()), static_cast (button.getHeight())); buttonArea.reduce(1.0f, 1.0f); g.setColour(backgroundColour); @@ -714,8 +714,8 @@ class LaF : public LookAndFeel_V4 .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.8f)); - const float width = button.getWidth(); - const float height = button.getHeight() ; + const auto width = static_cast (button.getWidth()); + const auto height = static_cast(button.getHeight()); bool isOn = button.getToggleState(); const float cornerSize = jmin (15.0f, jmin (width, height) * 0.45f); @@ -742,10 +742,10 @@ class LaF : public LookAndFeel_V4 else { - const auto fontSize = jmin (15.0f, button.getHeight() * 0.75f); + const auto fontSize = jmin (15.0f, static_cast (button.getHeight()) * 0.75f); const auto tickWidth = fontSize * 1.1f; - drawTickBox (g, button, 4.0f, (button.getHeight() - tickWidth) * 0.5f, + drawTickBox (g, button, 4.0f, (static_cast (button.getHeight()) - tickWidth) * 0.5f, tickWidth, tickWidth, button.getToggleState(), button.isEnabled(), @@ -821,7 +821,7 @@ class LaF : public LookAndFeel_V4 g.drawFittedText (text, r, position,1,0.f); g.setColour(ClSeperator); - g.drawLine(0, 18, width, 18 ,.8f); + g.drawLine(0, 18, static_cast (width), 18 ,.8f); } void positionComboBoxText (ComboBox& box, Label& label) override { @@ -852,9 +852,9 @@ class LaF : public LookAndFeel_V4 Rectangle buttonArea (buttonX, buttonY, buttonW, buttonH); Path path; - path.startNewSubPath (buttonX + 3.0f, buttonArea.getCentreY() - 2.0f); - path.lineTo (buttonArea.getCentreX(), buttonArea.getCentreY() + 3.0f); - path.lineTo (buttonArea.getRight() - 3.0f, buttonArea.getCentreY() - 2.0f); + path.startNewSubPath (static_cast (buttonX) + 3.0f, static_cast (buttonArea.getCentreY()) - 2.0f); + path.lineTo (static_cast (buttonArea.getCentreX()), static_cast (buttonArea.getCentreY()) + 3.0f); + path.lineTo (static_cast (buttonArea.getRight()) - 3.0f, static_cast (buttonArea.getCentreY()) - 2.0f); g.setColour (Colours::white.withAlpha ((box.isEnabled() ? 0.9f : 0.2f))); g.strokePath (path, PathStrokeType (2.0f)); @@ -867,7 +867,7 @@ class LaF : public LookAndFeel_V4 g.setColour (findColour (PopupMenu::headerTextColourId)); g.drawFittedText (sectionName, - area.getX() + 12, area.getY(), area.getWidth() - 16, (int) (area.getHeight() * 0.8f), + area.getX() + 12, area.getY(), area.getWidth() - 16, (int) (static_cast (area.getHeight()) * 0.8f), Justification::bottomLeft, 1); } @@ -916,7 +916,7 @@ class LaF : public LookAndFeel_V4 Font font (getPopupMenuFont()); font.setHeight(18.0f); - const float maxFontHeight = area.getHeight() / 1.3f; + const float maxFontHeight = static_cast (area.getHeight()) / 1.3f; if (font.getHeight() > maxFontHeight) font.setHeight (maxFontHeight); @@ -940,7 +940,7 @@ class LaF : public LookAndFeel_V4 const float arrowH = 0.6f * getPopupMenuFont().getAscent(); const float x = (float) r.removeFromRight ((int) arrowH).getX(); - const float halfH = (float) r.getCentreY(); + const auto halfH = static_cast(r.getCentreY()); Path p; p.addTriangle (x, halfH - arrowH * 0.5f, diff --git a/source/PluginEditor.h b/source/PluginEditor.h index ca6cc4b..fba4ae3 100644 --- a/source/PluginEditor.h +++ b/source/PluginEditor.h @@ -109,7 +109,7 @@ class PolarDesignerAudioProcessorEditor : public AudioProcessorEditor, private const int maxNumberBands = 5; int nActiveBands; int syncChannelIdx; - int oldAbLayerState; +// int oldAbLayerState; float trimSliderPrevPos = 0.22f; float minBandValueDistances[5]; @@ -118,7 +118,7 @@ class PolarDesignerAudioProcessorEditor : public AudioProcessorEditor, private int maxIt = 0; bool loadingFile; - bool recordingDisturber; +// bool recordingDisturber; bool presetListVisible; bool presetLoaded = false; diff --git a/source/PluginProcessor.h b/source/PluginProcessor.h index 668b005..711a1ab 100644 --- a/source/PluginProcessor.h +++ b/source/PluginProcessor.h @@ -229,7 +229,7 @@ class PolarDesignerAudioProcessor : public AudioProcessor, public AudioProcesso std::atomic* nBandsPtr; std::atomic* syncChannelPtr; - float oldSyncChannelPtr; +// float oldSyncChannelPtr; std::atomic* xOverFreqs[4]; std::atomic* dirFactors[5]; float oldDirFactors[5];