You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/micLevel_on_off/sketch.js
+9-9
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
varmic;
2
-
varamplitude,micLevel,masterLevel,levelLabel;
2
+
varamplitude,micLevel,outputLevel,levelLabel;
3
3
4
4
varsoundToggle;
5
5
varsoundOn=false;
@@ -17,8 +17,8 @@ function setup() {
17
17
mic.start();
18
18
19
19
// create controls
20
-
levelLabel=createP('Master Volume: ');
21
-
masterLevel=createSlider(0,100,50);
20
+
levelLabel=createP('Output Volume: ');
21
+
outputLevel=createSlider(0,100,50);
22
22
23
23
soundToggle=createButton('Sound ON');
24
24
soundToggle.mousePressed(toggleSound);
@@ -27,7 +27,7 @@ function setup() {
27
27
micToggle.mousePressed(toggleMic);
28
28
29
29
h=createP('enable the mic...');
30
-
createP('NOTE: Mic is disconnected from master output (speakers) by default. Turning sound on with mic.connect( ) may cause a <a href="https://en.wikipedia.org/wiki/Audio_feedback" target="_blank">feedback loop</a> between the mic and speakers. Try headphones.');
30
+
createP('NOTE: Mic is disconnected from main output (speakers) by default. Turning sound on with mic.connect( ) may cause a <a href="https://en.wikipedia.org/wiki/Audio_feedback" target="_blank">feedback loop</a> between the mic and speakers. Try headphones.');
0 commit comments