Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Commit

Permalink
updating the prefixing code to something more sensible
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills committed Oct 14, 2016
1 parent 1725ce2 commit dcd0f3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// create web audio api context
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

// create Oscillator and gain node
var oscillator = audioCtx.createOscillator();
Expand All @@ -23,8 +24,7 @@ var initialVol = 0.001;

// set options for the oscillator

oscillator.type = 'square';
oscillator.frequency.value = initialFreq; // value in hertz

oscillator.detune.value = 100; // value in cents
oscillator.start(0);

Expand Down

0 comments on commit dcd0f3f

Please sign in to comment.