sysaudio: Initial WebAudio backend implementation #411

Merged
iddev5 merged 5 commits from ay-sysaudio-web into main 2022-07-15 04:55:32 +00:00
iddev5 commented 2022-07-14 18:30:04 +00:00 (Migrated from github.com)

It can currently request devices (audio contexes) and run them, though data can't be processed. Device iterator also doesn't work yet.

Makes the necessary build.zig changes for examples to run.

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
It can currently request devices (audio contexes) and run them, though data can't be processed. Device iterator also doesn't work yet. Makes the necessary build.zig changes for examples to run. - [X] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
alichraghi (Migrated from github.com) reviewed 2022-07-14 19:07:01 +00:00
@ -0,0 +57,4 @@
pub fn requestDevice(audio: Audio, config: DeviceDescriptor) Error!Device {
// NOTE: WebAudio only supports F32 audio format, so config.format is unused
const mode = config.mode orelse .output;
alichraghi (Migrated from github.com) commented 2022-07-14 19:06:34 +00:00

shouldn't we require mode (like desktop implementation)? i don't think it's hard for user to just do .{ .mode = .output }. also has readibility benefit

shouldn't we require `mode` (like desktop implementation)? i don't think it's hard for user to just do `.{ .mode = .output }`. also has readibility benefit
emidoots (Migrated from github.com) reviewed 2022-07-15 04:55:04 +00:00
@ -0,0 +57,4 @@
pub fn requestDevice(audio: Audio, config: DeviceDescriptor) Error!Device {
// NOTE: WebAudio only supports F32 audio format, so config.format is unused
const mode = config.mode orelse .output;
emidoots (Migrated from github.com) commented 2022-07-15 04:55:04 +00:00

We should change DeviceDescriptor's mode field:

-mode: ?Mode = null,
+mode: Mode = .output,
We should change `DeviceDescriptor`'s `mode` field: ```diff -mode: ?Mode = null, +mode: Mode = .output, ```
emidoots (Migrated from github.com) approved these changes 2022-07-15 04:55:16 +00:00
emidoots (Migrated from github.com) left a comment

Super exciting!

Super exciting!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach!411
No description provided.