Skip to content

fix: resolve review findings (audio-thread safety, robustness)#18

Merged
yves-vogl merged 3 commits into
mainfrom
fix/review-findings
Jul 16, 2026
Merged

fix: resolve review findings (audio-thread safety, robustness)#18
yves-vogl merged 3 commits into
mainfrom
fix/review-findings

Conversation

@yves-vogl

Copy link
Copy Markdown
Contributor

Summary

Both fixes were already present as an uncommitted working-tree change at the start of this session; this PR verifies them against JUCE 8.0.14 source (juce_Convolution.cpp/.h, confirming reset() is noexcept/RT-safe and the cited overlapData/bufferOverlap behaviour), adds regression tests for each, and splits the change into one commit per issue.

Test plan

  • Two new Catch2 regression tests added in tests/EngineTests.cpp, one per issue; both independently verified to fail against the pre-fix code and pass with the fix (via git stash bisection during development).
  • cmake --build build --target Tests Nave_Standalone --parallel 3 — clean build, no new warnings from changed files.
  • ctest --test-dir build --output-on-failure — 53/53 tests green (51 pre-existing + 2 new).
  • CHANGELOG.md updated under ## [Unreleased] with a Fixed section for both issues.

🤖 Generated with Claude Code

yves-vogl and others added 3 commits July 16, 2026 02:03
juce::dsp::Convolution keeps an internal overlap-add tail that is only
ever mutated inside processSamples(); process() already skips
convolutionB.process() entirely while Blend is disengaged, so that tail
was left frozen (not decaying) and got added back into the output the
moment Blend re-engaged, unlike the LoCut/HiCut/Distance filters which
already reset on their own bypassed->engaged transition.

CabConvolutionEngine now tracks blendEngagedPreviously and calls
convolutionB.reset() on the same transition, mirroring the existing
pattern for the other stages.

Fixes #12

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
setImpulseResponse()/loadDefaultImpulseResponse() record IR A's onset
as the reference that setImpulseResponseB() phase-aligns IR B against,
but never re-ran that alignment for an already-loaded IR B when IR A
was reloaded with a different onset - leaving IR B silently aligned to
a stale, overwritten reference and reintroducing comb-filtering the
next time Blend crosses back into an engaged range.

CabConvolutionEngine now retains a copy of IR B's raw, pre-alignment
buffer/sample rate and automatically re-runs setImpulseResponseB()
against the new reference whenever IR A's onset changes (both from a
loaded IR and from the default-delta reset path), clearing that
bookkeeping again if IR B is later reset to its own default.

Fixes #13

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yves-vogl
yves-vogl merged commit 885f56b into main Jul 16, 2026
2 checks passed
@yves-vogl
yves-vogl deleted the fix/review-findings branch July 16, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant