Skip to content

Require implementations support exactly the inclusive range [3000, 768000] for sample rate - #2657

Merged
mjwilson-google merged 3 commits into
WebAudio:mainfrom
mjwilson-google:sample-rate
Jan 7, 2026
Merged

Require implementations support exactly the inclusive range [3000, 768000] for sample rate#2657
mjwilson-google merged 3 commits into
WebAudio:mainfrom
mjwilson-google:sample-rate

Conversation

@mjwilson-google

@mjwilson-google mjwilson-google commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Fixes #2649.

As decided at TPAC 2025, expand the required sample rate range from 3000 to 768000 Hz inclusive, and require that implementations reject rates outside this range.


Preview | Diff

@mjwilson-google

Copy link
Copy Markdown
Contributor Author

WPT update is in progress here: https://crrev.com/c/7204605

@mjwilson-google
mjwilson-google requested a review from hoch December 4, 2025 21:39
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 8, 2025
The specification is being updated to put different requirements on the
sample rate in WebAudio. Update the WPT to reflect this.

See WebAudio/web-audio-api#2657

Change-Id: Ic99a306da2cf625b52168c4143c0a3320aef1087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7204605
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1555679}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 8, 2025
The specification is being updated to put different requirements on the
sample rate in WebAudio. Update the WPT to reflect this.

See WebAudio/web-audio-api#2657

Change-Id: Ic99a306da2cf625b52168c4143c0a3320aef1087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7204605
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1555679}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 8, 2025
The specification is being updated to put different requirements on the
sample rate in WebAudio. Update the WPT to reflect this.

See WebAudio/web-audio-api#2657

Change-Id: Ic99a306da2cf625b52168c4143c0a3320aef1087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7204605
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1555679}

@padenot padenot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mjwilson-google
mjwilson-google merged commit 49cb551 into WebAudio:main Jan 7, 2026
1 check passed
@mjwilson-google
mjwilson-google deleted the sample-rate branch January 7, 2026 19:32
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jan 21, 2026
…options.html, a=testonly

SKIP_BMO_CHECK

The specification is being updated to put different requirements on the
sample rate in WebAudio. Update the WPT to reflect this.

See WebAudio/web-audio-api#2657

Change-Id: Ic99a306da2cf625b52168c4143c0a3320aef1087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7204605
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1555679}

wpt-commit: 0bf56d544f158e222ed3ae08aacd11c1df3ab94f
wpt-pr: 56569
MukundaKatta added a commit to MukundaKatta/web-audio-api-rs that referenced this pull request Apr 15, 2026
The Web Audio API specification mandates that implementations support
every sample rate in the inclusive range [3000, 768000]. Previously
`assert_valid_sample_rate` rejected values outside [2000, 384000],
which both rejected spec-valid rates like 480000 and 768000 and
accepted rates below the spec's 3000 Hz minimum.

Align the bounds with the spec and add boundary regression tests.

See WebAudio/web-audio-api#2657.

Closes orottier#563.
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

Successfully merging this pull request may close these issues.

Accepted sample rates for AudioContext are underspecified

3 participants