-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronous encoding/decoding #19
Comments
Would it be possible to keep the same API but have a flag which instructs the user agent to run the codec synchronously? I'm not sure all the requirements for the synchronous API (e.g., whether it's ok to unwind the stack or not), but this approach would at least ensure the encoding/decoding happens in the same task. |
I think synch audio decoding could be especially important for an AudioWorklet, which would need to use synchronous functions within its |
@anthumchris - I wouldn't expect folks to do much decoding in the AudioWorklet process() loop. Audio rendering needs to meet tight deadlines and be glitch free. The ideal setup would be to do decoding in a worker (async is fine) and send the decoded output to AudioWorklet using a SharedArrayBuffer. See this overview. |
Being able to synchronously decode is essential for folding a bit of the packetization latency inside the audio output latency, for a decode-type scenario and lowering the overall end-to-end latency. |
This also came up in #51. That issue was closed with rationale:
Closing this issue with same reasoning. |
@padenot mentioned there are some use cases for synchronously encoding/decoding media in contrast to the current API proposal which encourages/mandates asynchronous execution.
The text was updated successfully, but these errors were encountered: