v2.1.1 release: delay-click fix + internal consolidation

Mirror of Lyrebird dev HEAD (9f791c7c) minus maintainer-only paths. Patch release:
fixes the allpass fractional-delay click (DelayLine/CombFilter/AllpassFilter/
DelayLineFeedback under a modulated delay) and lands the internal code-quality
consolidation pass (~160 deduped sites + shared base classes/helpers, bit-identical
output). No public API removed or changed. See RELEASES.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 21:20:49 -07:00
parent 844dc4d9cd
commit f8878324fd
212 changed files with 1386 additions and 2549 deletions
+12 -13
View File
@@ -135,8 +135,9 @@ public protocol ControlGenerator: Generator {
///
/// Used by `calculatedSamples` when `controlBlockSize < count` to accumulate
/// results from multiple `_computeSamples` calls without heap allocation.
/// Initialise to `[[]]` (via `GeneratorBase` default). Call `_setupSubBlockBuffer()`
/// in the designated `Control.init` to resize for sub-block assembly. Never call on the RT thread.
/// Initialise to `[[]]` (via `GeneratorBase` default). A sub-blocking `Control.init`
/// calls `_setupSubBlockBuffer()` to resize for sub-block assembly (never on the RT
/// thread); `BlockRateControlGenerator` conformers never sub-block and skip it.
var _subBlockBuffer: [[Double]] { get set }
}
@@ -205,18 +206,16 @@ extension Generator {
/// Bypass-sub-block fan-out cache helper.
///
/// Used by generators that override `calculatedSamples` to force `_computeSamples` to
/// run exactly once per audio block, bypassing the `ControlGenerator` extension's
/// sub-block path. Required for any generator whose state must advance once per audio
/// block (IIR filters, bus writers, buffer-position advancers, gain smoothers, trigger
/// detectors, random drawers). See `docs/protocols/writing-generators.md` §15.
/// The block-rate gateway: runs `_computeSamples` exactly once per audio block,
/// bypassing the `ControlGenerator` extension's sub-block path. Required for any
/// generator whose state must advance once per audio block (IIR filters, bus writers,
/// buffer-position advancers, gain smoothers, trigger detectors, random drawers,
/// analysers). See `docs/protocols/writing-generators.md` §15.
///
/// Drop-in replacement for the canonical bypass block:
/// ```swift
/// public func calculatedSamples(graph: SynthGraph, count: Int) -> [[Double]] {
/// _calculatedSamplesBlockRate(graph: graph, count: count)
/// }
/// ```
/// The standard way to get this behaviour is to conform the control generator to
/// `BlockRateControlGenerator`, whose `calculatedSamples` default calls this method —
/// prefer that over hand-writing a `calculatedSamples` forwarder. Call this directly
/// only when the bypass is needed but the marker cannot apply.
@inline(__always)
public func _calculatedSamplesBlockRate(
graph: SynthGraph,