Created
October 22, 2013 18:42
-
-
Save jsantell/7105867 to your computer and use it in GitHub Desktop.
Reproduction case for changing oscillator type implementation, Bug 929621
https://bugzilla.mozilla.org/show_bug.cgi?id=929621
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TYPES = ['sine', 'sawtooth','triangle', 'square']; | |
var ctx = new (window.AudioContext || window.webkitAudioContext)(); | |
var osc = ctx.createOscillator(); | |
var t = 0; | |
osc.connect(ctx.destination); | |
osc.start(0); | |
setInterval(function () { osc.type = TYPES[t++ % TYPES.length]; }, 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment