Lightningbeam/daw-backend/src
Skyler Lehmkuhl d001ca1083 Fix save crash on zero/sparse-audio projects (phantom pool placeholder)
`AudioPool::load_from_serialized` sizes the slot Vec by pool_index and fills gaps
with empty `AudioFile::new(PathBuf::new(), …)` placeholders. Two bugs let a
placeholder reach the next save and abort it with "Is a directory":

- Off-by-one: `entries.max().unwrap_or(0) + 1` made an *empty* pool length 1, so a
  project with no audio still got one placeholder. Size by `max(pool_index + 1)`
  → empty entries yield length 0.
- `serialize()` emitted placeholder slots: an empty path round-trips to
  `relative_path = Some("")`, which `save_beam` resolves to the project directory
  (`join("")`) and tries to read as media. Skip empty-path / no-packed-media slots.
- Defense in `save_beam`: gate referenced-media packing on `full.is_file()` (not
  `exists()`), so any blank/dir path falls through to embedded data instead of
  reading a directory.

Pre-existing; surfaced by a save → reload → save cycle on a raster-only project.
2026-06-20 18:46:19 -04:00
..
audio Fix save crash on zero/sparse-audio projects (phantom pool placeholder) 2026-06-20 18:46:19 -04:00
command Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00
dsp Add state-variable filter 2026-02-20 00:20:59 -05:00
effects Add audio node graph editing 2025-10-25 03:29:54 -04:00
io Massive tempo refactor - make beats canonical time rep and allow them to be non constant 2026-04-02 10:26:01 -04:00
tui Massive tempo refactor - make beats canonical time rep and allow them to be non constant 2026-04-02 10:26:01 -04:00
lib.rs Make beats canonical representation rather than seconds 2026-06-02 13:06:36 -04:00
main.rs midi hotplug 2025-11-03 09:48:38 -05:00
tempo_map.rs Make beats canonical representation rather than seconds 2026-06-02 13:06:36 -04:00
time.rs Massive tempo refactor - make beats canonical time rep and allow them to be non constant 2026-04-02 10:26:01 -04:00