Skip to content

Commit eb7a15b

Browse files
committed
move scratch frames to stack
1 parent eddc033 commit eb7a15b

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/dsp/engine_processor.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,8 @@ class EngineProcessor {
6464
const std::unordered_map<BarelyInstrument*, barely::InstrumentProcessor*>& instruments,
6565
float* output_samples, int output_frame_count) noexcept {
6666
for (int frame = 0; frame < output_frame_count; ++frame) {
67-
delay_frame_.fill(0.0f);
68-
sidechain_frame_.fill(0.0f);
69-
70-
float* delay_frame = delay_frame_.data();
71-
float* sidechain_frame = sidechain_frame_.data();
67+
float delay_frame[kStereoChannelCount] = {};
68+
float sidechain_frame[kStereoChannelCount] = {};
7269
float* output_frame = &output_samples[kStereoChannelCount * frame];
7370

7471
for (const auto& [_, processor] : instruments) {
@@ -168,12 +165,6 @@ class EngineProcessor {
168165
// Sidechain.
169166
Sidechain sidechain_;
170167

171-
// Delay send frame.
172-
std::array<float, kStereoChannelCount> delay_frame_ = {};
173-
174-
// Sidechain send frame.
175-
std::array<float, kStereoChannelCount> sidechain_frame_ = {};
176-
177168
// Current parameters.
178169
EffectParams current_params_ = {};
179170

0 commit comments

Comments
 (0)