首页 > 编程语言 > 详细

[Javascript] Intro to the Web Audio API

时间:2015-11-11 06:17:56      阅读:322      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!