[Javascript] Intro to the Web Audio API

An introduction to the Web Audio API. In this lesson, we cover creating an audio context and an oscillator node that actually plays a sound in the browser, and different ways to alter that sound.

[Javascript] Intro to the Web Audio API

[Javascript] Intro to the Web Audio API

var context = new window.AudioContext() || new window.webkitAudioContext(),
osc = context.createOscillator(); osc.frequency.value = 440;
osc.connect(context.destination);
osc.type = "sine";
// uncomment the following line to make noise!
// osc.start();
上一篇:JavaScript中对数组和数组API的认识


下一篇:深入理解JavaScript系列(17):面向对象编程之概论