From b63a13925b20e6947bce27f246acaf96abae3188 Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Fri, 9 Oct 2026 11:49:05 +0300 Subject: [PATCH] fix(Play Audio): Resume the web AudioContext on the first user gesture cpal (wasm) creates its output stream at startup, before any user gesture, so the browser leaves the WebAudio AudioContext 'suspended'. As a result no audio plays, and the transport clock never advances because the audio callback drives it. Wrap the AudioContext constructor before the wasm module loads so that every context cpal creates is captured. On the first pointer, mouse, touch or key event, resume any context that is still suspended. Signed-off-by: Ahmed Moussa --- .gitignore | 1 + apps/soundcraft-web/index.html | 21 +++++++++++++++++++++ contributors/people.toml | 5 +++++ 3 files changed, 27 insertions(+) diff --git a/.gitignore b/.gitignore index 75bd19e..901797f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ plan/ /target-*/ /craft-fonts/ plans/ +.DS_Store diff --git a/apps/soundcraft-web/index.html b/apps/soundcraft-web/index.html index b68f2d7..af72b21 100644 --- a/apps/soundcraft-web/index.html +++ b/apps/soundcraft-web/index.html @@ -15,6 +15,27 @@ +
Loading SoundCraft…
diff --git a/contributors/people.toml b/contributors/people.toml index 89c6db2..9d108ba 100644 --- a/contributors/people.toml +++ b/contributors/people.toml @@ -21,3 +21,8 @@ real_name = "Brandon Thomas" display_name = "Brandon Thomas" sync_github_name = false + +[people.hamada147] +real_name = "Ahmed Moussa" +display_name = "Ahmed Moussa" +sync_github_name = true