G2.3: auto-reload instruments from state file after bridge respawn

This commit is contained in:
2026-08-16 07:33:14 +07:00
parent 28441566c2
commit 4faa5a3504
7 changed files with 130 additions and 1 deletions
+5
View File
@@ -173,6 +173,11 @@ fn spawn_bridge(
.env("SF_PARENT_PID", std::process::id().to_string())
.env("SF_SAMPLE_RATE", sample_rate.to_string())
.env("SF_BLOCK_SIZE", "256")
// G2.3: point the bridge at the persisted state file so a
// respawn can auto-reload instruments (StateStore::defaultPath).
.env("SF_STATE_FILE", std::env::var("APPDATA")
.unwrap_or_else(|_| ".".into())
+ "/SonicForgeDAW/state/bridge_state.json")
.spawn()
{
Ok((mut rx, child)) => {