JSFiddle - React, Tailwind, and code Playground
JavaScript
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var LiveAudioContext = (function (_super) {
__extends(LiveAudioContext, _super);
function LiveAudioContext() {
_super.call(this);
}
LiveAudioContext.prototype.setPlaybackRate = function (rate) {
console.log("Set rate to " + rate + ".");
};
return LiveAudioContext;
}(AudioContext));
var liveCtx = new LiveAudioContext();
var oscillator = liveCtx.createOscillator();
var gain = liveCtx.createGain();
gain.gain.value = 0.1;
oscillator.connect(gain);
gain.connect(liveCtx.destination);
// oscillator.start();