Skip to content

Conversation

@roderickvd
Copy link
Member

Implements missing microphone/input support for WebAudio and Emscripten backends. Previously, calling any input-related methods would return empty results or panic.

Implementation

Uses navigator.mediaDevices.getUserMedia() to request microphone access, then creates a MediaStreamAudioSourceNode connected to a ScriptProcessorNode for audio capture. The async getUserMedia Promise is handled via wasm_bindgen_futures::spawn_local(), allowing the synchronous API to return immediately while permission is requested in the background.

Status

This is very preliminary and mostly untested code. Please test and report back here.

Both backends were returning empty configs or panicking when trying
to use microphone input. Now properly implements getUserMedia() with
async support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants