Last active
November 3, 2016 04:11
-
-
Save captbaritone/5247fd00622acd1061be5e597fb95cd2 to your computer and use it in GitHub Desktop.
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
<script> | |
var context = new (window.AudioContext || window.webkitAudioContext)(); | |
var chanSplit = context.createChannelSplitter(2); | |
var leftGain = context.createGain(); | |
var rightGain = context.createGain(); | |
var chanMerge = context.createChannelMerger(2); | |
var filter = context.createBiquadFilter(); | |
chanSplit.connect(leftGain, 0); | |
chanSplit.connect(rightGain, 1); | |
leftGain.connect(chanMerge, 0, 0); | |
rightGain.connect(chanMerge, 0, 1); | |
chanMerge.connect(filter); | |
filter.connect(context.destination); | |
function start () { | |
var source = context.createOscillator(); | |
source.connect(chanSplit); | |
source.start(0); | |
source.stop(2); // This triggers the crash. | |
} | |
</script> | |
<p>Safari will crash on/before the end of the tone</p> | |
<button onclick='start()'>Play then crash</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment