Skip to content

Specify render quantum size range#2667

Merged
mjwilson-google merged 1 commit intoWebAudio:mainfrom
mjwilson-google:rendersizehint-constraints
Feb 17, 2026
Merged

Specify render quantum size range#2667
mjwilson-google merged 1 commit intoWebAudio:mainfrom
mjwilson-google:rendersizehint-constraints

Conversation

@mjwilson-google
Copy link
Contributor

Fixes #2664

Specify the valid range, and include references in the relevant places. Also require that sample rate is set before the render quantum size in OfflineAudioContext. Don't modify AudioContext constructor yet, since we have a separate issue tracking that (#2663).

@mjwilson-google mjwilson-google added the Agenda+ Should be discussed at the next WG meeting. https://speced.github.io/spec-maintenance/about/ label Feb 7, 2026
Copy link
Member

@padenot padenot left a comment

Choose a reason for hiding this comment

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

We noticed during the 2026-02-17 call that there's a name discrepancy: renderSizeHint in the Option object, but renderQuantumSize on the BaseAudioContext and Worklet scope, but that might be too late to fix.

This PT looks good in any case

@mjwilson-google
Copy link
Contributor Author

Thank you!

name discrepancy

I think this is because renderQuantumSize is the actual size as an integer, whereas renderSizeHint can take other values like 'default' and 'hardware'. If we change the API to only accept integer size hints then I think we should also change the Option object name to renderQuantumSize.

As far as I know, Chromium is the only implementation experimenting with this API right now and we're still in origin trial. So I don't think it's too late to make fixes yet.

@mjwilson-google mjwilson-google merged commit ef33f45 into WebAudio:main Feb 17, 2026
1 check passed
@mjwilson-google mjwilson-google deleted the rendersizehint-constraints branch February 17, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agenda+ Should be discussed at the next WG meeting. https://speced.github.io/spec-maintenance/about/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constrain valid renderSizeHint to inclusive range [1 sample, 6 seconds]

3 participants