Skip to content

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

Closed

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.

Activity

  1. added this to the v1.0.0-alpha.1 milestone on Nov 5, 2026
  2. added 2 commits that reference this issue on Nov 8, 2026
    81d655d
    dc5342b
  3. jderochervlk commented on Nov 8, 2026

    @jderochervlk
    CollaboratorAuthor

    Fixed by #399 and now on main through #397 at 844c32af. The listed audio and matrix APIs use native typed arrays without adding output-buffer copies. Browser regressions check channel contents and mutations to analyser/filter buffers. Matrix tests cover nonidentity conversions, and negative consumer fixtures reject plain arrays for analyser and matrix calls.

    Main CI passed the browser, feature and negative-consumer checks. Closing as completed. This issue stayed open because #399 originally merged into a feature branch.

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