Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed abnormal behaviour of audio output in p5.signal example #476

Merged
merged 2 commits into from
May 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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