码迷,mamicode.com
首页 > 编程语言 > 详细

[Javascript] Intro to the Web Audio API

时间:2015-11-11 06:19:54      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/Answer1215/p/4955024.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!