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.
const audioCtx = new AudioContext();
console.log(audioCtx.sampleRate);