Skip to content

Commit 4e9d456

Browse files
Format code
1 parent c6de2ea commit 4e9d456

7 files changed

Lines changed: 22 additions & 17 deletions

File tree

include/neuron/core/buffer.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@ namespace neuron {
99
template<typename DataType>
1010
class Buffer {
1111
public:
12-
constexpr Buffer() noexcept : m_data(nullptr), m_size(0) {}
13-
constexpr Buffer(DataType* data, int size) noexcept : m_data(data), m_size(size) {}
12+
constexpr Buffer() noexcept
13+
: m_data(nullptr)
14+
, m_size(0)
15+
{
16+
}
17+
constexpr Buffer(DataType* data, int size) noexcept
18+
: m_data(data)
19+
, m_size(size)
20+
{
21+
}
1422

1523
constexpr DataType& operator[](int index) noexcept { return m_data[index]; }
1624
constexpr const DataType& operator[](int index) const noexcept { return m_data[index]; }
@@ -30,7 +38,6 @@ namespace neuron {
3038
private:
3139
DataType* m_data;
3240
int m_size;
33-
3441
};
3542

3643
}

include/neuron/dsp/generators/oscillator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ namespace neuron {
6969
switch (parameter) {
7070
case OscillatorParameter::OSC_FREQUENCY:
7171
m_frequencyModulator = ModulationSource(modulator);
72-
break;
72+
break;
7373
default:
7474
break;
7575
}

include/neuron/dsp/modulators/lfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace neuron {
3434
switch (parameter) {
3535
case LfoParameter::LFO_FREQUENCY:
3636
m_frequencyModulator = ModulationSource(modulator);
37-
break;
37+
break;
3838
default:
3939
break;
4040
}

include/neuron/dsp/modulators/modulator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ namespace neuron {
1717
* Initializes the modulator with a zero-filled buffer.
1818
*/
1919
Modulator()
20-
: m_modulationValues{}
20+
: m_modulationValues {}
2121
, m_bufferView(m_modulationValues, 0)
2222
{
23-
2423
}
2524

2625
/**
@@ -83,7 +82,8 @@ namespace neuron {
8382
, m_get_modulation_values_fn([](const void* ptr) noexcept -> const Buffer<float>& {
8483
return static_cast<const Modulator<M>*>(ptr)->GetModulationValues();
8584
})
86-
{}
85+
{
86+
}
8787

8888
ModulationSource(const ModulationSource&) = default;
8989
ModulationSource& operator=(const ModulationSource&) = default;

src/dsp/generators/oscillator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ void Oscillator::GenerateImpl(Buffer<Sample>& output)
5454
output[i],
5555
freqModValues[i],
5656
p_frequencyModulationDepth,
57-
m_context.sampleRate
58-
);
57+
m_context.sampleRate);
5958
if (wasCycleCompleted && m_follower != nullptr) {
6059
m_follower->Reset(m_wavetable.GetPhase());
6160
}

src/dsp/modulators/lfo.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ void Lfo::ModulateImpl()
2929
m_modulationValues[i],
3030
freqModValues[i],
3131
p_frequencyModulationDepth,
32-
m_context.sampleRate
33-
);
32+
m_context.sampleRate);
3433
}
3534
}
3635

@@ -46,7 +45,7 @@ void Lfo::DetachModulatorImpl(LfoParameter parameter)
4645
switch (parameter) {
4746
case LfoParameter::LFO_FREQUENCY:
4847
m_frequencyModulator.Detach();
49-
break;
48+
break;
5049
default:
5150
break;
5251
}
@@ -57,7 +56,7 @@ void Lfo::SetModulationDepthImpl(LfoParameter parameter, float depth)
5756
switch (parameter) {
5857
case LfoParameter::LFO_FREQUENCY:
5958
p_frequencyModulationDepth = depth;
60-
break;
59+
break;
6160
default:
6261
break;
6362
}
@@ -69,7 +68,7 @@ void Lfo::AttachParameterToSourceImpl(LfoParameter parameter, std::atomic<float>
6968
switch (parameter) {
7069
case LfoParameter::LFO_FREQUENCY:
7170
p_frequency.AttachSource(source);
72-
break;
71+
break;
7372
default:
7473
break;
7574
}

src/dsp/processors/filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void Filter::DetachModulatorImpl(FilterParameter parameter)
4949
switch (parameter) {
5050
case FilterParameter::FILTER_CUTOFF_FREQUENCY:
5151
m_cutoffFrequencyModulator.Detach();
52-
break;
52+
break;
5353
default:
5454
break;
5555
}
@@ -60,7 +60,7 @@ void Filter::SetModulationDepthImpl(FilterParameter parameter, float depth)
6060
switch (parameter) {
6161
case FilterParameter::FILTER_CUTOFF_FREQUENCY:
6262
p_cutoffFrequencyModulationDepth = depth;
63-
break;
63+
break;
6464
default:
6565
break;
6666
}

0 commit comments

Comments
 (0)