Fix .beam save quirks: real sample rate, drop dead fields
Address the code smells flagged in the .beam format spec: - Write the project's actual sample rate on save instead of a hardcoded 48000 (add AudioProject::sample_rate()). - Remove the vestigial RasterKeyframe.media_path field (it was only used by the legacy ZIP loader, which now derives "media/raster/<id>.png" from the keyframe id) and the dead buffer_path_at_time accessor. Backward-compatible: older files carrying media_path deserialize fine (the field is ignored). - Drop the unused SaveSettings fields auto_embed_threshold_bytes / force_embed_all / force_link_all; only large_media_mode was ever consulted. Un-prefix the now-used `settings` parameter. Update BEAM_FILE_FORMAT.md to match. The remaining notes (reserved MediaKind::Video, exact-match version check) are design choices, left as-is.
This commit is contained in:
@@ -731,7 +731,6 @@ impl FileOperationsWorker {
|
||||
|
||||
let settings = SaveSettings {
|
||||
large_media_mode,
|
||||
..SaveSettings::default()
|
||||
};
|
||||
match save_beam(&path, &document, &mut audio_project, audio_pool_entries, layer_to_track_map, &thumbnail_blobs, &settings) {
|
||||
Ok(()) => {
|
||||
|
||||
Reference in New Issue
Block a user