From ec61217f53841065c0d0003618c5c67c92caadb4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Nov 2023 01:44:02 +0000 Subject: [PATCH] Apply clang-format --- src/dsp/EQ/EQProcessor.cpp | 19 +++++++++---------- src/dsp/EQ/EQProcessor.h | 4 ++-- src/gui/Brickwall/BrickwallChyron.h | 6 +++--- src/gui/Brickwall/BrickwallPlot.h | 2 +- src/gui/EQ/EQEditor.cpp | 4 ++-- src/gui/Shared/SpectrumAnalyser.cpp | 16 ++++++++-------- src/gui/Shared/SpectrumAnalyser.h | 4 ++-- src/gui/Shared/SpectrumAnalyserTask.cpp | 2 +- src/gui/Shared/SpectrumAnalyserTask.h | 2 +- 9 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/dsp/EQ/EQProcessor.cpp b/src/dsp/EQ/EQProcessor.cpp index f859d5f..1ac678c 100644 --- a/src/dsp/EQ/EQProcessor.cpp +++ b/src/dsp/EQ/EQProcessor.cpp @@ -31,7 +31,6 @@ void EQProcessor::processBlock (const chowdsp::BufferView& buffer) chowdsp::BufferMath::copyBufferData (buffer, preEqAudioBuffer); spectrumAnalyserTask->processBlockInput (preEqAudioBuffer); - const auto&& eqParams = getEQParams(); EQToolParams::EQParams::setEQParameters (eq, eqParams); linPhaseEQ.setParameters (eqParams); @@ -53,15 +52,15 @@ void EQProcessor::processBlock (const chowdsp::BufferView& buffer) } //post-EQ?? -// if (params.isOpen.load()) -// { -// juce::AudioBuffer postEqAudioBuffer; -// postEqAudioBuffer.setSize (numChannels, numSamples); -// chowdsp::BufferMath::copyBufferData (buffer, postEqAudioBuffer); -// //decide which buffer to send based on whether we are displaying pre or post spectrum analyser -// //have this called only if bool is true -//// spectrumAnalyserTask->processBlockInput (postEqAudioBuffer); -// } + // if (params.isOpen.load()) + // { + // juce::AudioBuffer postEqAudioBuffer; + // postEqAudioBuffer.setSize (numChannels, numSamples); + // chowdsp::BufferMath::copyBufferData (buffer, postEqAudioBuffer); + // //decide which buffer to send based on whether we are displaying pre or post spectrum analyser + // //have this called only if bool is true + //// spectrumAnalyserTask->processBlockInput (postEqAudioBuffer); + // } } int EQProcessor::getLatencySamples() const diff --git a/src/dsp/EQ/EQProcessor.h b/src/dsp/EQ/EQProcessor.h index e7e9795..b86fed5 100644 --- a/src/dsp/EQ/EQProcessor.h +++ b/src/dsp/EQ/EQProcessor.h @@ -105,13 +105,13 @@ struct EQToolParams : chowdsp::ParamHolder "Linear Phase On/Off", false }; - std::atomic isOpen {false}; + std::atomic isOpen { false }; }; class EQProcessor { public: - explicit EQProcessor (const EQToolParams& eqParams) : params (eqParams), spectrumAnalyserTask(std::make_unique()){} + explicit EQProcessor (const EQToolParams& eqParams) : params (eqParams), spectrumAnalyserTask (std::make_unique()) {} void prepare (const juce::dsp::ProcessSpec& spec); void processBlock (const chowdsp::BufferView& buffer); diff --git a/src/gui/Brickwall/BrickwallChyron.h b/src/gui/Brickwall/BrickwallChyron.h index 68d99ed..f482b0a 100644 --- a/src/gui/Brickwall/BrickwallChyron.h +++ b/src/gui/Brickwall/BrickwallChyron.h @@ -10,8 +10,8 @@ class BrickwallChyron : public juce::Component { public: BrickwallChyron (chowdsp::PluginState& pluginState, - dsp::brickwall::Params& params, - const chowdsp::HostContextProvider& hcp); + dsp::brickwall::Params& params, + const chowdsp::HostContextProvider& hcp); void resized() override; void paint (juce::Graphics& g) override; @@ -25,4 +25,4 @@ class BrickwallChyron : public juce::Component JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BrickwallChyron) }; -} +} // namespace gui::brickwall diff --git a/src/gui/Brickwall/BrickwallPlot.h b/src/gui/Brickwall/BrickwallPlot.h index 059bc7d..b955ff1 100644 --- a/src/gui/Brickwall/BrickwallPlot.h +++ b/src/gui/Brickwall/BrickwallPlot.h @@ -1,8 +1,8 @@ #pragma once +#include "BrickwallChyron.h" #include "dsp/Brickwall/BrickwallProcessor.h" #include "state/PluginState.h" -#include "BrickwallChyron.h" namespace gui::brickwall { diff --git a/src/gui/EQ/EQEditor.cpp b/src/gui/EQ/EQEditor.cpp index 0bffa28..2af7fdd 100644 --- a/src/gui/EQ/EQEditor.cpp +++ b/src/gui/EQ/EQEditor.cpp @@ -15,7 +15,7 @@ EQEditor::EQEditor (State& pluginState, dsp::eq::EQToolParams& eqParams, const c drawCheckButton ("Vector/square-check-regular.svg", colours::linesColour, colours::linesColour), drawXButton ("Vector/rectangle-xmark-regular.svg", colours::linesColour, colours::linesColour) { - params.isOpen.store(true); + params.isOpen.store (true); bottomBar = std::make_unique (pluginState, eqParams); @@ -57,7 +57,7 @@ EQEditor::EQEditor (State& pluginState, dsp::eq::EQToolParams& eqParams, const c EQEditor::~EQEditor() { - params.isOpen.store(false); + params.isOpen.store (false); } void EQEditor::paint (juce::Graphics& g) diff --git a/src/gui/Shared/SpectrumAnalyser.cpp b/src/gui/Shared/SpectrumAnalyser.cpp index b27d0c7..fbcb2a0 100644 --- a/src/gui/Shared/SpectrumAnalyser.cpp +++ b/src/gui/Shared/SpectrumAnalyser.cpp @@ -16,12 +16,12 @@ SpectrumAnalyser::~SpectrumAnalyser() void SpectrumAnalyser::paint (juce::Graphics& g) { -// g.fillAll(juce::Colours::wheat.withAlpha(0.4f)); -// g.setColour(gui::logo::colours::backgroundBlue.brighter(0.4f)); -// g.strokePath(prePath, juce::PathStrokeType(1)); - g.setGradientFill (juce::ColourGradient::vertical (gui::logo::colours::backgroundBlue.withAlpha(0.4f), + // g.fillAll(juce::Colours::wheat.withAlpha(0.4f)); + // g.setColour(gui::logo::colours::backgroundBlue.brighter(0.4f)); + // g.strokePath(prePath, juce::PathStrokeType(1)); + g.setGradientFill (juce::ColourGradient::vertical (gui::logo::colours::backgroundBlue.withAlpha (0.4f), eqPlot.getYCoordinateForDecibels (0.0f), - gui::logo::colours::backgroundBlue.darker().withAlpha(0.4f), + gui::logo::colours::backgroundBlue.darker().withAlpha (0.4f), (float) getHeight())); g.fillPath (postPath); } @@ -42,11 +42,11 @@ void SpectrumAnalyser::visibilityChanged() void SpectrumAnalyser::timerCallback() { - updatePlotPath(postPath); -// updatePlotPath(prePath); + updatePlotPath (postPath); + // updatePlotPath(prePath); } -void SpectrumAnalyser::updatePlotPath(juce::Path& pathToUpdate) +void SpectrumAnalyser::updatePlotPath (juce::Path& pathToUpdate) { pathToUpdate.clear(); diff --git a/src/gui/Shared/SpectrumAnalyser.h b/src/gui/Shared/SpectrumAnalyser.h index 5af5f53..29d2cff 100644 --- a/src/gui/Shared/SpectrumAnalyser.h +++ b/src/gui/Shared/SpectrumAnalyser.h @@ -11,11 +11,11 @@ class SpectrumAnalyser : public juce::Component, void paint (juce::Graphics& g) override; void visibilityChanged() override; void timerCallback() override; - void updatePlotPath(juce::Path& pathToUpdate); + void updatePlotPath (juce::Path& pathToUpdate); private: juce::Path postPath; -// juce::Path prePath; + // juce::Path prePath; const chowdsp::SpectrumPlotBase& eqPlot; gui::SpectrumAnalyserTask::SpectrumAnalyserBackgroundTask& task; diff --git a/src/gui/Shared/SpectrumAnalyserTask.cpp b/src/gui/Shared/SpectrumAnalyserTask.cpp index 1633af6..9d546fa 100644 --- a/src/gui/Shared/SpectrumAnalyserTask.cpp +++ b/src/gui/Shared/SpectrumAnalyserTask.cpp @@ -101,7 +101,7 @@ void SpectrumAnalyserTask::SpectrumAnalyserBackgroundTask::runTask (const juce:: freqSmooth (fftMagsUnsmoothedDB.data(), fftMagsSmoothedDB.data(), fftOutSize, 1.0f / 128.0f); expSmooth (magsPrevious.data(), fftMagsSmoothedDB.data(), fftOutSize, 0.2f); } -} +} // namespace gui // notes for Rachel: // - dynamic range trick is cool! // - tweaked some things re: painting, frequency band smoothing, smoothing across time, and threading stuff diff --git a/src/gui/Shared/SpectrumAnalyserTask.h b/src/gui/Shared/SpectrumAnalyserTask.h index 38b45a3..fa224d3 100644 --- a/src/gui/Shared/SpectrumAnalyserTask.h +++ b/src/gui/Shared/SpectrumAnalyserTask.h @@ -37,4 +37,4 @@ class SpectrumAnalyserTask private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SpectrumAnalyserTask) }; -} \ No newline at end of file +} // namespace gui \ No newline at end of file