effectcraft/crates
bflatastic 93856382e7 Preview: Audio, Lock and Shy keep the cache; playback with audio waits for frames (#103)
Toggling a layer's Audio, Lock or Shy switch (or Hide Shy Layers) threw
away every cached frame: the RAM preview identity hashes each comp's
address, which any edit replaces, and the layer and disk cache keys
hashed every switch. None of these change pixels.

- Switches::pixels, Layer::same_pixels and Comp::same_pixels (exhaustive
  field lists, so a new field must be considered) and Comp::pixel_form.
- Layer cache keys hash Switches::pixels; the disk cache's comp content
  key hashes Comp::pixel_form.
- Frames::identity: when a new revision's comps draw the same pixels as
  those of the comp's last new identity, that identity (and the project
  holding its comps' addresses) is kept, so the frames stay, also when the
  switch is toggled back.

With audio on, playback skipped frames that weren't rendered yet. Now the
sound waits: until the frames ahead (to the end of the preview, or what
fits in the RAM preview) are cached, every frame shows as it renders,
silently, like a preview without audio; then the sound starts in sync.
Reaching an uncached frame stops the sound instead of skipping frames.

Tests: audio_lock_and_shy_switches_keep_the_frames (frames.rs, nested
comps and toggling back), audio_lock_and_shy_keep_cached_layers (engine),
the disk key in tests_disk_cache, and
preview_with_audio_shows_every_frame_and_sounds_once_cached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 01:46:35 +07:00
..
automation Merge pull request #118 from storytold/claude/system-fonts-rmnw4m 2026-10-07 00:37:13 +07:00
av1enc G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
color G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
effects G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
engine Preview: Audio, Lock and Shy keep the cache; playback with audio waits for frames (#103) 2026-10-07 01:46:35 +07:00
export G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
expr Merge pull request #6 from storybored379/pr/expr-runtime-stack-leak 2026-10-05 12:10:53 +07:00
geom Never crash: deny panic lints in the already-clean crates and apps 2026-10-04 14:52:39 -04:00
gpu G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
hevcenc Never crash: HEVC encoder without expect()/unreachable!() 2026-10-04 13:23:03 -04:00
host G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
interchange Never crash: reject timeline documents nested too deeply 2026-10-04 14:05:57 -04:00
keyframe keyframe: never-crash deny lints (craftrules standards/never-crash.md) 2026-10-06 08:41:33 -04:00
lottie G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
media G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
model G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
opusenc G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
path G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
pdf G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
plugin G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
project Preview: Audio, Lock and Shy keep the cache; playback with audio waits for frames (#103) 2026-10-07 01:46:35 +07:00
psd G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
raster G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
render Preview: Audio, Lock and Shy keep the cache; playback with audio waits for frames (#103) 2026-10-07 01:46:35 +07:00
script Merge pull request #10 from storybored379/pr/spatial-tangent-getter-names 2026-10-05 12:11:18 +07:00
segment G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
svg G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
text Merge pull request #118 from storytold/claude/system-fonts-rmnw4m 2026-10-07 00:37:13 +07:00
time Never crash: Tick and timecode arithmetic can't overflow or divide by zero 2026-10-04 14:20:33 -04:00
track G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
ui-egui Preview: Audio, Lock and Shy keep the cache; playback with audio waits for frames (#103) 2026-10-07 01:46:35 +07:00
vp9enc G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00