[Javascript] Intro to the Web Audio API

2022-12-07,,,,

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.

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] Intro to the Web Audio API的相关教程结束。

《[Javascript] Intro to the Web Audio API.doc》

下载本文的Word格式文档,以方便收藏与打印。