Files
effectcraft/crates
vangel76 998448f94b Audio: a time-reversed layer plays its audio backwards (#3239)
A layer with a negative time stretch was skipped by the mix. It now plays
its audio reversed at its stretched speed, through the same linear
resampler as forward stretch: a reversed read starts at the layer time of
the run's end and is played last to first, so comp sample k plays the
source just before layer_time(k) (at -100 % with the start at the out
point, the exact mirror Backwards gives a forward layer). Backwards on a
reversed layer plays it forwards.

Resampled runs start at the exact source position (from the layer time in
ticks) instead of the grid sample a block starts on, so mixing in frame
blocks and in export's one-second blocks gives the same samples, and they
read one more source sample so a block's last sample blends instead of
holding. Audio effects run on comp time since the layer's start, which
joins up across blocks at any stretch and equals the layer time at 100 %.

Reads are made in pieces of at most MAX_READ source frames, so memory
stays bounded for fast layers and nested fast precomps (the work for
nested 1 % precomps is not bounded; follow-up). A stretch faster than 1 %
is silent as a last-resort guard, with a tolerance so exactly 1 % plays.
A zero or non-finite stretch is skipped.

Fixes #3239
2026-11-07 16:41:19 +01:00
..
…
…
…
…
…