Skip to content

Commit

Permalink
Merge pull request #476 from endurance21/fixes4
Browse files Browse the repository at this point in the history
fixed abnormal behaviour of audio output in p5.signal example
  • Loading branch information
montoyamoraga authored May 2, 2020
2 parents b6679b8 + f423ee4 commit 374d306
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ define(function (require) {
* @example
* <div><code>
* let carrier, modulator;
* let hasStarted = false;
*
* function setup() {
* let cnv = createCanvas(100, 100);
Expand All @@ -39,7 +40,6 @@ define(function (require) {
* text('tap to play', 20, 20);
*
* carrier = new p5.Oscillator('sine');
* carrier.start();
* carrier.amp(1); // set amplitude
* carrier.freq(220); // set frequency
*
Expand All @@ -58,6 +58,10 @@ define(function (require) {
* function canvasPressed() {
* userStartAudio();
* carrier.amp(1.0);
* if(!hasStarted){
* carrier.start();
* hasStarted = true;
* }
* }
*
* function mouseReleased() {
Expand Down

0 comments on commit 374d306

Please sign in to comment.