|
speed
fps
100 % score 0 |
I've added simple chime sounds for WebKit (based on the WebAudio API)
if('webkitAudioContext' in window) AC = new webkitAudioContext();
else Actx = null;
...
if(AC) sound(440, .3);
...
function sound(f, g) {
var osc = AC.createOscillator();
osc.frequency.value = f;
var gain = AC.createGainNode();
osc.connect(gain);
gain.connect(AC.destination);
gain.gain.value = g;
gain.gain.setTargetAtTime(0, AC.currentTime, .1);
osc.start(AC.currentTime );
osc.stop(AC.currentTime + .5);
}
Sounds for Mozila only.