-
Notifications
You must be signed in to change notification settings - Fork 172
Description
AudioContext.sampleRate mentions:
The supported values are the same as the sample rates for an AudioBuffer.
Elsewhere, createBuffer says:
An implementation MUST support sample rates in at least the range 8000 to 96000.
MUST suggests that this range is the minimum set of supported sample rates, but outside of this range the behavior is undefined. A possible interpretation is that an implementation is free to support any valid sample rate. It's also possible that OfflineAudioContext and AudioContext could have different behavior since AudioContext's sample rate is a hint and OfflineAudioContext's is a requirement.
The WPT tests of AudioContextOptions are more strict. They assert that a sampleRate of 1 or 1000000 should be rejected with a NotSupportedError.
The spec could probably clarify the status of sample rates outside of this range.