createOscillator noteOn funktioniert nicht

Ich habe dieses Snippet von einer Website erhalten (kann mich momentan nicht erinnern, wo) und es funktioniert nicht mehr.

Ich benutze es, um einen Ton zu spielen.

Ist es etwas, was ich falsch mache oder hat sich Chrome kürzlich geändert?

Play = (function () {
	var ctx = new(window.audioContext || window.webkitAudioContext);
	return function (duration, freq, finishedCallback) {
		duration = +duration;
		if (typeof finishedCallback != "function") {
			finishedCallback = function () {};
		}
		var osc = ctx.createOscillator();
		osc.type = 0;
		osc.connect(ctx.destination);
		osc.frequency.value = freq;
		osc.noteOn(0);
		setTimeout(
			function () {
				osc.noteOff(0);
				finishedCallback();
			}
			,duration
		);
	};
})();
Play(50,500)

Antworten auf die Frage(2)

Ihre Antwort auf die Frage