Skip to content

Commit 7abbdb9

Browse files
fix an amplitude reference example (#563)
fixes issue #552
1 parent 3b82514 commit 7abbdb9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/amplitude.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ import processorNames from './audioWorklet/processorNames';
3434
* ellipse(width/2, height/2, size, size);
3535
* }
3636
*
37-
* function toggleSound() {
37+
* function togglePlay() {
3838
* if (sound.isPlaying() ){
39-
* sound.stop();
39+
* sound.pause();
4040
* } else {
41-
* sound.play();
41+
* sound.loop();
42+
* amplitude = new p5.Amplitude();
43+
* amplitude.setInput(sound);
4244
* }
4345
* }
4446
*

0 commit comments

Comments
 (0)