我使用的是Chrome 22.0.1229.94,无法弄清楚为什么使用Web Audio API在任何页面上都没有声音。我已经 checkin 了标志,但是似乎没有标志来启用API,我是否需要做一些其他事情才能使它起作用?
我尝试运行一个简单的脚本来获得一些声音,但没有声音。
<script type="text/javascript">
var context = new webkitAudioContext(),
oscillator = context.createOscillator();
oscillator.type = 2;
oscillator.frequency.value = 500;
oscillator.connect(context.destination);
oscillator.noteOn(0);
</script>
最佳答案
根据latest spec,noteOn()已更改为start()。