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 <moussa.ahmed95@gmail.com>
This commit is contained in:
Ahmed Moussa
2026-10-09 13:07:37 +03:00
parent c51e5d5ec5
commit b63a13925b
3 changed files with 27 additions and 0 deletions
+5
View File
@@ -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