MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / testBypass

Function testBypass

tests/client_deess_test.cpp:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86// ── Tests ──────────────────────────────────────────────────────────────
87
88void testBypass()
89{
90 ClientDeEss d;
91 d.prepare(kSampleRate);
92 d.setEnabled(false);
93
94 const int frames = 1024;
95 auto ref = makeTone(5000.0, frames, dbToLin(-6.0f));
96 auto out = ref;
97 processBlocks(d, out.data(), frames);
98
99 float maxDiff = 0.0f;
100 for (size_t i = 0; i < out.size(); ++i)
101 maxDiff = std::max(maxDiff, std::fabs(out[i] - ref[i]));
102
103 report("bypass: disabled passes through unchanged",
104 maxDiff < 1e-6f,
105 "maxDiff=" + std::to_string(maxDiff));
106}
107
108// Low-frequency signal (below the sidechain band) should NOT trigger
109// attenuation even at loud levels.

Callers 1

mainFunction · 0.70

Calls 8

makeToneFunction · 0.70
dbToLinFunction · 0.70
processBlocksFunction · 0.70
reportFunction · 0.70
prepareMethod · 0.45
setEnabledMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected