Implement standalone CPU convolution in chad.dll DSP #1
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!1
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Logard0 on GitHub · 2026-12-05 11:57 UTC · original
Logard0:fix/chad-cpu-convolution→main· +394 −11 · 1 files · 1 commits · merged 2026-12-05 14:45 UTCImplements standalone CPU partitioned frequency-domain convolution in
chad.dll(crates/larp-hle/src/modules/dsp.rs) for mono 1024-sample convolution streams, replacing the silence-only stub while preserving the guest ABI and status publication ordering.Summary of changes
ConvolutionState::from_desc): Parses 2048-float partitions of interleaved complex bins (1024positive bins per partition) and skips the final partition if its first word is0xFFFFACE1.ConvolutionState::process): Zero-pads each 1024-sample input block to 2048, runs an in-place radix-2 DIT FFT, pushes positive bins into a spectrum ring buffer, accumulatesX[t - k] * IR[k], zeroes Nyquist (bin 1024), mirrors conjugate bins (1025..2047), runs an unnormalized inverse FFT, and outputs samples1024..2047scaled by2 / 2048and the linearcommand.gains[0]..gains[1]ramp.XDspSubmitCommand): Preserves all guest structs/signatures, outputs silence for unsupported stream modes, and issues aReleasefence after writing output before publishingstatus.completed.0xFFFFACE1sentinel handling, multi-partition spectrum ring delay, and silence/completion for unsupported modes.Verification
cargo test --locked -p larp-hle dsp: 4 passed, 0 failedcargo clippy --locked --tests -p larp-hle: 0 warnings indsp.rsMade with the help of Gemini 4 Neon.