javascript - How to get access to the output buffer with the Web Audio API? - Stack Overflow

I'd like to access the audio data in the outputdestination buffer. To be specific I would like to

I'd like to access the audio data in the output/destination buffer. To be specific I would like to save the data to a file. I would also like to add custom effects as AudioNode's.

How can I achieve this with the Web Audio API? I don't see an AudioDestinationBuffer interface or a way to add a custom AudioNode in the specs.

I'd like to access the audio data in the output/destination buffer. To be specific I would like to save the data to a file. I would also like to add custom effects as AudioNode's.

How can I achieve this with the Web Audio API? I don't see an AudioDestinationBuffer interface or a way to add a custom AudioNode in the specs.

Share Improve this question edited Jul 2, 2012 at 8:55 Jan Deinhard asked Jul 2, 2012 at 6:38 Jan DeinhardJan Deinhard 20.2k26 gold badges85 silver badges142 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

You'll have to add one of these http://www.w3/TR/webaudio/#JavaScriptAudioNode right before connecting to the destination.

This will give you access to the raw audio data, and any processing made by effect nodes etc. will already be applied. Just make sure this is the very last node before the destination.

Here's a little something on how you use the JavaScriptAudioNode http://www.html5rocks./en/tutorials/webaudio/games/#toc-clip-detect, which I hope will illustrate how to access the audio data.

JavaScriptNode, later renamed to ScriptProcessorNode, has been deprecated in favor of AudioWorkletNode. There is an example on the AudioWorkletProcessor MDN page.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744217326a4563615.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信