Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
The sampleRate property of the BaseAudioContext interface returns a floating point number representing the sample rate, in samples per second, used by all nodes in this audio context. This limitation means that sample-rate converters are not supported.
A floating point number indicating the audio context's sample rate, in samples per second.
Note: For a full Web Audio example implementation, see one of our Web Audio Demos on the MDN GitHub repo. Try entering audioCtx.sampleRate into your browser console.
| Web Audio API # dom-baseaudiocontext-samplerate |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 26, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.