wasm: defer first engine start + fix ffmpeg SDK path#2129
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromrestart_engine()while nested inside document loading (loadFile→on_documentChanged) deadlocks the async worklet init, so loading a document would hang. Deferring the firststart_engine()viaQTimer::singleShot(0, …)runs it at a clean stack depth and the document loads/plays normally.media: use
OSSIA_SDKfor the wasm ffmpeg lib pathsThe 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