Skip to content

Use native typed arrays in Web Audio and DOMMatrix bindings #389

Open

Description

@jderochervlk

Part of #382 — v1.0.0 alpha readiness.

Problem

Several APIs accept or return ordinary arrays where the platform requires typed arrays:

Review Chromium probes rejected ordinary arrays for sampled analyser/copy/matrix methods, accepted native typed buffers, and confirmed typed return values. Filter signatures were reviewed against the platform contract, not separately browser-probed.

Acceptance criteria

  • Correct corresponding input and output types across all listed families, including both matrix modules.
  • Check related typed-array conversions for the same representation error.
  • Add browser tests using OfflineAudioContext and typed buffers, asserting output data/buffer behavior rather than merely construction.
  • Add typed DOMMatrix conversion round-trip tests.
  • Add compile tests rejecting ordinary arrays where native typed buffers are required.

Performance/behavior constraint

Do not insert implicit copies for output-buffer APIs: the native operation must write to the caller's supplied buffer. Keep the scope to representation correctness, not a Web Audio API redesign.

Coordination

Use the regression infrastructure in #383. Source fixes can be developed in parallel, but this issue should close with executed regression coverage, not only a successful compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions