Skip to content
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

Let user specify output device for online AudioContext #216

Closed
orottier opened this issue Sep 2, 2022 · 1 comment
Closed

Let user specify output device for online AudioContext #216

orottier opened this issue Sep 2, 2022 · 1 comment
Assignees

Comments

@orottier
Copy link
Owner

orottier commented Sep 2, 2022

Official spec will land soon:
WebAudio/web-audio-api#2400 (comment)

It should be quite straightforward for us to port to the cpal and cubeb backend

@orottier
Copy link
Owner Author

orottier commented Oct 5, 2022

Spec has landed. I will whip up a simple implementation first where you can specify the output device during AudioContext construction.
The feature to change the output device while the context is running will be very tricky. cpal may not offer the desired functionality - RustAudio/cpal#373 . Cubeb does have some callbacks for device switching. It probably warrants a dedicated ticket to handle disconnection of the current device.
Additional complexity is that the sample rate may change in this case which requires extra bookkeeping throughout the render thread

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

No branches or pull requests

1 participant