htl5 voice recording with isualization [closed]

一笑奈何 提交于 2019-12-02 13:31:32

The creation of the volume gain node is done only after the success of getUserMedia, in the success function.

By the time the code encounter the volume connect command, volume is not yet allocated.

You have to 'chain' all your node connection starting from success.

Quick fix : just put those lines :

// we connect the recorder(node to destination(speakers))
volume.connect(splitter);
splitter.connect(analyser, 0, 0);
splitter.connect(analyser2, 1, 0);
analyser.connect(recorder);
recorder.connect(context.destination);

at the end of the success function.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!