Skip to content

Commit

Permalink
Apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 23, 2023
1 parent 93fe502 commit ec61217
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 30 deletions.
19 changes: 9 additions & 10 deletions src/dsp/EQ/EQProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ void EQProcessor::processBlock (const chowdsp::BufferView<float>& buffer)
chowdsp::BufferMath::copyBufferData (buffer, preEqAudioBuffer);
spectrumAnalyserTask->processBlockInput (preEqAudioBuffer);


const auto&& eqParams = getEQParams();
EQToolParams::EQParams::setEQParameters (eq, eqParams);
linPhaseEQ.setParameters (eqParams);
Expand All @@ -53,15 +52,15 @@ void EQProcessor::processBlock (const chowdsp::BufferView<float>& buffer)
}

//post-EQ??
// if (params.isOpen.load())
// {
// juce::AudioBuffer<float> 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<float> 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
Expand Down
4 changes: 2 additions & 2 deletions src/dsp/EQ/EQProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ struct EQToolParams : chowdsp::ParamHolder
"Linear Phase On/Off",
false };

std::atomic<bool> isOpen {false};
std::atomic<bool> isOpen { false };
};

class EQProcessor
{
public:
explicit EQProcessor (const EQToolParams& eqParams) : params (eqParams), spectrumAnalyserTask(std::make_unique<gui::SpectrumAnalyserTask>()){}
explicit EQProcessor (const EQToolParams& eqParams) : params (eqParams), spectrumAnalyserTask (std::make_unique<gui::SpectrumAnalyserTask>()) {}

void prepare (const juce::dsp::ProcessSpec& spec);
void processBlock (const chowdsp::BufferView<float>& buffer);
Expand Down
6 changes: 3 additions & 3 deletions src/gui/Brickwall/BrickwallChyron.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,4 +25,4 @@ class BrickwallChyron : public juce::Component

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BrickwallChyron)
};
}
} // namespace gui::brickwall
2 changes: 1 addition & 1 deletion src/gui/Brickwall/BrickwallPlot.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "BrickwallChyron.h"
#include "dsp/Brickwall/BrickwallProcessor.h"
#include "state/PluginState.h"
#include "BrickwallChyron.h"

namespace gui::brickwall
{
Expand Down
4 changes: 2 additions & 2 deletions src/gui/EQ/EQEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<BottomBar> (pluginState, eqParams);

Expand Down Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions src/gui/Shared/SpectrumAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions src/gui/Shared/SpectrumAnalyser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/Shared/SpectrumAnalyserTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/gui/Shared/SpectrumAnalyserTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ class SpectrumAnalyserTask
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SpectrumAnalyserTask)
};
}
} // namespace gui

0 comments on commit ec61217

Please sign in to comment.