scriptprocessor

How can I prevent breakup/choppiness/glitches when using an AudioWorklet to stream captured audio?

可紊 提交于 2019-12-23 15:44:50
问题 We've been working on a JavaScript-based audio chat client that runs in the browser and sends audio samples to a server via a WebSocket. We previously tried using the Web Audio API's ScriptProcessorNode to obtain the sample values. This worked well on our desktops and laptops, but we experienced poor audio quality when transmitting from a handheld platform we must support. We've attributed this to the documented script processor performance issues (https://developer.mozilla.org/en-US/docs/Web

AudioWorklet error: DOMException: The user aborted a request

泄露秘密 提交于 2019-12-17 20:14:18
问题 I've successfully instantiated a simple AudioWorklet in React and wish to start a simple oscillator like in Google's example. In order to test run it, I am rendering a button whose onClick event calls the following: src/App.jsx: userGesture(){ //create a new AudioContext this.context = new AudioContext(); //Add our Processor module to the AudioWorklet this.context.audioWorklet.addModule('worklet/processor.js').then(() => { //Create an oscillator and run it through the processor let oscillator

ScriptProcessorNode - prevent jittering?

混江龙づ霸主 提交于 2019-12-12 04:23:11
问题 I'm using a ScriptProcessorNode in order to record audio from a MediaStream / MediaStreamNode . Any time a UI operation blocks the main thread a little bit (like drawing on a canvas), the audio result is jittery at those specific moments. It seems like AudioWorker is eventually going to be implemented, which I think would solve my problem, but as of now, what is the solution? Cheers! 回答1: Use MediaRecorder API to record rather than ScriptProcessor, is my only advice. 来源: https://stackoverflow

How to modulate params from a Web Audio Api ScriptProcessor?

我只是一个虾纸丫 提交于 2019-12-12 00:28:59
问题 I am working on a Browser Synth with the Web Audio Api. Instead of using the "build in" OscillatorNode I want to develop a custom Oscillator model via the ScriptProcessorNode. I am able to modulate the AudioParams of the "Build in" nodes with other nodes. How can I connect internal Params of the ProcessorNode to other AudioNodes? 回答1: If you mean "how do I create AudioParam members of a ScriptProcessorNode that I can connect other sources to, to modulate my ScriptProcessor" - the short answer