Skip to content

Implementing the alcCapture* API ? #2

Closed
@yoanlcq

Description

@yoanlcq

Thought that, since we are to fix a bunch of stuff in the AL implementation, why not also implement the alcCapture stuff ? Here's what I see:

If we don't

  • We won't have to write tests for that;
  • One thing less for the Emscripten folks to review in the future PR;
  • Nobody has complained anyway (yet);

If we do

  • We'd be interested in calling ctx.createMediaStreamSource() given navigator.getUserMedia() with only audio enabled.
    The latter asynchronously requests the user's permission to open microphone input (which may be then granted or denied), which is not expected by typical OpenAL apps. How do we want to handle this ?
    I see these options :
    1. alcCaptureOpen() opens a dummy "proxy" device which successfully records nothing until the user allows microphone input, AND still "succeeds" if the user denies mic input;
    2. Same as above, except calls start returning errors when the user denies mic input;
    3. alcCaptureOpen() fails until mic input is allowed, and we say "If you're on Emscripten, you have to retry several times";
    4. A better idea?
  • AFAIK the only supported format is float32, so to support OpenAL's standard 8-bit/16-bit ints formats we have to some post-processing;
  • We could grab this or this, or others, as guides.

At this point here are my questions:

  • Should we do it ?
  • If so, I'd like to go ahead! TBH I haven't used the Web Audio API before but it looks fun and within my reach. Would that be okay ?
  • Thoughts regarding the aforementioned "allow/deny" issues (and perhaps other issues I didn't have in mind) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions