wip: wasm: use miniaudio instead of sdl in emscripten#877
Open
jcelerier wants to merge 5 commits into
Open
Conversation
dd24e18 to
e9016f5
Compare
Pulls the emscripten MIDI backend fix (observer update() notify arg) needed for the wasm build. See celtera/libremidi#228.
e9016f5 to
96141ee
Compare
miniaudio_protocol.hpp used to #define MINIAUDIO_IMPLEMENTATION itself, so every TU that included it compiled a full copy of the ma_* implementation. That was harmless only because the miniaudio include dir was private to score-plugin-audio. Enabling the miniaudio path in libossia's make_audio_engine gave a second copy and produced duplicate-symbol link errors once both objects end up in one binary (wasm, and any static build). Make libossia the single owner: - miniaudio_protocol.hpp is now declarations-only (no MINIAUDIO_IMPLEMENTATION) and marks the API with MA_API = OSSIA_EXPORT. - miniaudio.cpp is the one TU that defines MINIAUDIO_IMPLEMENTATION; kept out of unity builds so it can't be reordered past a declarations-only include. - ossia links it wherever miniaudio is used (macOS/Linux/BSD/wasm, not Windows) and pulls in the CoreAudio frameworks on Apple. OSSIA_EXPORT is empty in static builds (one definition, referenced across libraries), and export/import when ossia is a shared lib, so score-plugin-audio links this single copy in every configuration instead of recompiling it. 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.
No description provided.