Skip to content

wasm: defer first engine start + fix ffmpeg SDK path#2129

Merged
jcelerier merged 2 commits into
masterfrom
fix/wasm-audio-start-and-ffmpeg-path
Jul 19, 2026
Merged

wasm: defer first engine start + fix ffmpeg SDK path#2129
jcelerier merged 2 commits into
masterfrom
fix/wasm-audio-start-and-ffmpeg-path

Conversation

@jcelerier

Copy link
Copy Markdown
Member

Two small WASM build/runtime fixes.

audio: defer the first wasm engine start out of document loading
On WASM the miniaudio WebAudio backend blocks (emscripten_sleep / ASYNCIFY) while waiting for the AudioWorklet. Starting it synchronously from restart_engine() while nested inside document loading (loadFileon_documentChanged) deadlocks the async worklet init, so loading a document would hang. Deferring the first start_engine() via QTimer::singleShot(0, …) runs it at a clean stack depth and the document loads/plays normally.

media: use OSSIA_SDK for the wasm ffmpeg lib paths
The include dir already used ${OSSIA_SDK}/ffmpeg, but the static libs were hardcoded to /opt/ossia-sdk-wasm, breaking builds against an SDK placed anywhere else. Point them at ${OSSIA_SDK} too.

🤖 Generated with Claude Code

jcelerier and others added 2 commits July 18, 2026 22:47
On WASM the miniaudio WebAudio backend blocks (emscripten_sleep / ASYNCIFY)
while waiting for the AudioWorklet to come up. Starting it synchronously from
restart_engine() while nested inside document loading (loadFile ->
on_documentChanged) deadlocks the async worklet init. Defer the first
start_engine() to the event loop so it runs at a clean stack depth.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019oPj1zRcxSQX7FNni7EHM6
The include dir already used ${OSSIA_SDK}/ffmpeg, but the static libs were
hardcoded to /opt/ossia-sdk-wasm, so the build broke against any SDK placed
elsewhere. Point them at ${OSSIA_SDK} too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019oPj1zRcxSQX7FNni7EHM6
@jcelerier
jcelerier merged commit 775b9a2 into master Jul 19, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant