mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-29 04:56:46 -06:00
The monitor ring fed raw input-device samples to the output callback as if they were at the session rate. A 16 kHz or 44.1 kHz input played back too fast (higher pitch) and ran dry between bursts, so it sounded quiet. InputRing now knows the input rate and converts to the session rate with linear interpolation in pop_into, allocation-free and non-blocking. The buffer cap is computed once in new(). Tests cover rate up-conversion, down-conversion, equal rates and underrun. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>