Change sample rate of AudioContext (getUserMedia)

后端 未结 7 2248
粉色の甜心
粉色の甜心 2020-12-08 10:07

Im trying to record a 48000Hz recording via getUserMedia. But without luck. The returned audio MediaStream returns 44100Hz. How can i set this to 48000Hz?

Here are s

7条回答
  •  星月不相逢
    2020-12-08 10:57

    it's been added to chrome:

    var ctx = new (window.AudioContext || window.webkitAudioContext)({ sampleRate:16000});

    https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext

提交回复
热议问题