Skip to content

emscripten: fix observer update() call (missing notify arg)#228

Merged
jcelerier merged 2 commits into
masterfrom
fix/wasm-emscripten-midi-update
Jul 10, 2026
Merged

emscripten: fix observer update() call (missing notify arg)#228
jcelerier merged 2 commits into
masterfrom
fix/wasm-emscripten-midi-update

Conversation

@jcelerier

Copy link
Copy Markdown
Member

The emscripten MIDI backend's observer_emscripten::update() takes (inputs, outputs, bool notify), but the devices_poll() call site in midi_access.hpp still passed only 2 args:

midi_access.hpp:178:  obs->update(m_current_inputs, m_current_outputs);        // 2 args
observer.hpp:25:      void update(…inputs, …outputs, bool notify);              // 3 args

This breaks any wasm build (too few arguments to function call). The emscripten backend is compiled only for wasm, so non-wasm CI never caught it. devices_poll() detects hotplugged devices → notify = true.

Found while reviving the ossia/score wasm build (ossia/score#2034).

🤖 Generated with Claude Code

observer_emscripten::update() gained a 'bool notify' parameter, but the
devices_poll() call site still passed 2 args, breaking the wasm build (the
emscripten backend is only compiled for wasm, so other CI never caught it).
Poll detects hotplugged devices -> notify=true.
jcelerier added a commit to ossia/score that referenced this pull request Jul 10, 2026
Pulls libossia with the bumped libremidi that fixes the emscripten observer
update() call. ossia/libossia#907 -> celtera/libremidi#228.
Builds libremidi + the emscripten example with emsdk so the WebMIDI backend
(backends/emscripten/*) is compiled on every PR. That backend is wasm-only, so
no other CI job exercised it -- which is how the observer update() arg-count
regression fixed in this PR slipped through.
@jcelerier jcelerier merged commit a70dce3 into master Jul 10, 2026
90 checks passed
jcelerier pushed a commit to ossia/libossia that referenced this pull request Jul 11, 2026
Pulls the emscripten MIDI backend fix (observer update() notify arg) needed for
the wasm build. See celtera/libremidi#228.
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