Generating sound on the fly with javascript/html5

前端 未结 7 1882
庸人自扰
庸人自扰 2020-12-12 13:09

Is it possible to generate a constant sound stream with javascript/html5? For example, to generate a perpetual sine wave, I would have a callback function, that would be cal

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 13:34

    This is not real answer on your question because you have asked for a JavaScript solution, but you can use ActionScript. It should run on all major browsers.

    • ActionScript API Audio Generation

    You can call ActionScript functions from within JavaScript.

    • ActionScript API Call JavaScript

    In that way you can wrap the ActionScript sound generation functions and make a JavaScript implementation of them. Just use Adobe Flex to build a tiny swf and then use that as backend for your JavaScript code.

提交回复
热议问题