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

Fixing drywet method bug and p5.Effect.js test #606

Merged
merged 1 commit into from
Apr 25, 2021
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions lib/p5.sound.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** [p5.sound] Version: 1.0.0 - 2021-03-04 */
/** [p5.sound] Version: 1.0.0 - 2021-04-19 */
/**
* <p>p5.sound extends p5 with <a href="http://caniuse.com/audio-api"
* target="_blank">Web Audio</a> functionality including audio input,
Expand Down Expand Up @@ -1180,6 +1180,7 @@ var CustomError = function CustomError(name, errorTrace, failedPath) {

var moduleSources = [__webpack_require__(27)["default"], __webpack_require__(28)["default"], __webpack_require__(29)["default"]];
var audioWorklet_ac = master.audiocontext;
var initializedAudioWorklets = false;

function loadAudioWorkletModules() {
return Promise.all(moduleSources.map(function (moduleSrc) {
Expand All @@ -1192,6 +1193,8 @@ function loadAudioWorkletModules() {
}

p5.prototype.registerMethod('init', function () {
if (initializedAudioWorklets) return;

if (!this.preload && !window.preload) {
this.preload = function () {};
}
Expand All @@ -1200,6 +1203,8 @@ p5.prototype.registerMethod('init', function () {
this._incrementPreload();

var onWorkletModulesLoad = function () {
initializedAudioWorklets = true;

this._decrementPreload();
}.bind(this);

Expand Down Expand Up @@ -6527,7 +6532,7 @@ function () {

}, {
key: "drywet",
value: function drywet() {
value: function drywet(fade) {
if (typeof fade !== 'undefined') {
this._drywet.fade.value = fade;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/p5.sound.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/p5.sound.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/p5.sound.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Effect {
* @for p5.Effect
* @param {Number} [fade] The desired drywet value (0 - 1.0)
*/
drywet() {
drywet(fade) {
if (typeof fade !== 'undefined') {
this._drywet.fade.value = fade;
}
Expand Down