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

NoDevice error on web #881

Open
lylythechosenone opened this issue May 3, 2024 · 1 comment
Open

NoDevice error on web #881

lylythechosenone opened this issue May 3, 2024 · 1 comment

Comments

@lylythechosenone
Copy link

Overview

I'm attempting to play audio on wasm32-unknown-unknown. Going through rodio, I receive a NoDevice error when attempting to create an OutputStream. Through some investigation, I believe this comes from cpal::default_host().default_device() returning None. My program works correctly on all native platforms (that I've tried), it only fails on web.

Steps to reproduce

Attempt to get a device via cpal::default_host().default_device() on wasm32-unknown-unknown.

I was able to reproduce this issue on both Chrome and Safari, but could not test on Firefox because I could not get WebGPU to work.

Versions

cpal - v0.15.3
rodio - v0.17.3
Chrome - 124.0.6367.62
Safari - 17.4.1 (19618.1.15.11.14)

rustc:

rustc 1.79.0-nightly (3a36386dc 2024-04-25)
binary: rustc
commit-hash: 3a36386dc1075018dc7ca2640a2656adb31a61fe
commit-date: 2024-04-25
host: aarch64-apple-darwin
release: 1.79.0-nightly
LLVM version: 18.1.4

MacOS:

System Version:	macOS 14.4.1 (23E224)
Kernel Version:	Darwin 23.4.0
@Jelmerta
Copy link

I have the same issue, did you figure this out? I'm gonna try just running web-sys AudioContext directly

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

2 participants