Skip to content

Commit 1e2af06

Browse files
authored
Merge pull request #351 from processing/patch/audiocontext
Patch/audiocontext
2 parents bbcc104 + 98f3eeb commit 1e2af06

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

lib/p5.sound.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! p5.sound.js v0.3.11 2019-03-13 */
1+
/*! p5.sound.js v0.3.11 2019-03-14 */
22
/**
33
* p5.sound extends p5 with <a href="http://caniuse.com/audio-api"
44
* target="_blank">Web Audio</a> functionality including audio input,
@@ -1069,7 +1069,7 @@ audiocontext = function (StartAudioContext, Context, Tone) {
10691069
* myDiv.position(0, 0);
10701070
*
10711071
* var mySynth = new p5.MonoSynth();
1072-
*
1072+
*
10731073
* // This won't play until the context has started
10741074
* mySynth.play('A6');
10751075
*
@@ -1095,8 +1095,7 @@ audiocontext = function (StartAudioContext, Context, Tone) {
10951095
}(StartAudioContext, Tone_core_Context, Tone_core_Tone);
10961096
var master;
10971097
'use strict';
1098-
const audiocontext = audiocontext;
1099-
master = function () {
1098+
master = function (audiocontext) {
11001099
/**
11011100
* Master contains AudioContext and the master sound output.
11021101
*/
@@ -1203,7 +1202,7 @@ master = function () {
12031202
p5.soundOut._silentNode.gain.value = 0;
12041203
p5.soundOut._silentNode.connect(p5sound.audiocontext.destination);
12051204
return p5sound;
1206-
}();
1205+
}(audiocontext);
12071206
var helpers;
12081207
'use strict';
12091208
helpers = function () {

lib/p5.sound.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/audiocontext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ define(['StartAudioContext', 'Tone/core/Context', 'Tone/core/Tone'], function (r
7575
* myDiv.position(0, 0);
7676
*
7777
* var mySynth = new p5.MonoSynth();
78-
*
78+
*
7979
* // This won't play until the context has started
8080
* mySynth.play('A6');
8181
*

src/master.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use strict';
22

3-
const audiocontext = require('audiocontext');
4-
5-
define(function () {
63

4+
define(['audiocontext'], function (require, audiocontext) {
75
/**
86
* Master contains AudioContext and the master sound output.
97
*/

0 commit comments

Comments
 (0)