Skip to content

Commit 959de65

Browse files
authored
Merge pull request #683 from capogreco/672_docs_fixed_incorrect_documentation_of_callback_params_in_p5.SoundFile_addCue
documentation issue #672 re: callback params in p5.SoundFile addCue
2 parents d9e1ce8 + 7e58f0a commit 959de65

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/soundfile.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,9 +1420,6 @@ class SoundFile {
14201420
* Accepts a callback function, a time (in seconds) at which to trigger
14211421
* the callback, and an optional parameter for the callback.
14221422
*
1423-
* Time will be passed as the first parameter to the callback function,
1424-
* and param will be the second parameter.
1425-
*
14261423
*
14271424
* @method addCue
14281425
* @for p5.SoundFile
@@ -1434,10 +1431,10 @@ class SoundFile {
14341431
* the callback function.
14351432
* @param {Function} callback Name of a function that will be
14361433
* called at the given time. The callback will
1437-
* receive time and (optionally) param as its
1438-
* two parameters.
1434+
* optionally receive the third argument as its
1435+
* parameter.
14391436
* @param {Object} [value] An object to be passed as the
1440-
* second parameter to the
1437+
* optional parameter to the
14411438
* callback function.
14421439
* @return {Number} id ID of this cue,
14431440
* useful for removeCue(id)
@@ -1533,7 +1530,6 @@ class SoundFile {
15331530
var leftLimit = this._prevUpdateTime || 0;
15341531
var rightLimit = playbackTime;
15351532
if (leftLimit <= callbackTime && callbackTime <= rightLimit) {
1536-
// pass the scheduled callbackTime as parameter to the callback
15371533
cue.callback(val);
15381534
}
15391535
}

0 commit comments

Comments
 (0)