Summary
Clock jitter and drift restore the input length by center-cropping or padding the variable-length resampler output. A one-sample change in raw output length can therefore move the final signal by a full sample and overwhelm the intended fractional-sample impairment.
Evidence
For an 8192-sample complex tone with 5000 polyphase branches and seed 7:
- 0 ppm: raw length 8216, final best lag 0
- 10 ppm: raw length 8217, final best lag 1
- 100 ppm: raw length 8217, final best lag 1
- 1000 ppm: raw length 8217, final best lag 1
The wrappers crop or pad based only on output length. If exactly one sample is discarded, slice_back is zero and a slice ending at -slice_back can also become empty.
Proposed direction
Track group delay and sampling-time origin explicitly, then normalize length without changing alignment when raw output count crosses an integer boundary. Add impulse or tone regression tests for alignment and the one-sample discard case.
Summary
Clock jitter and drift restore the input length by center-cropping or padding the variable-length resampler output. A one-sample change in raw output length can therefore move the final signal by a full sample and overwhelm the intended fractional-sample impairment.
Evidence
For an 8192-sample complex tone with 5000 polyphase branches and seed 7:
The wrappers crop or pad based only on output length. If exactly one sample is discarded, slice_back is zero and a slice ending at -slice_back can also become empty.
Proposed direction
Track group delay and sampling-time origin explicitly, then normalize length without changing alignment when raw output count crosses an integer boundary. Add impulse or tone regression tests for alignment and the one-sample discard case.