Skip to content

Commit 7e58f0a

Browse files
committed
fixed documentation issue #672 re: callback params in p5.SoundFile addCue
1 parent 22928e7 commit 7e58f0a

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
@@ -1342,9 +1342,6 @@ class SoundFile {
13421342
* Accepts a callback function, a time (in seconds) at which to trigger
13431343
* the callback, and an optional parameter for the callback.
13441344
*
1345-
* Time will be passed as the first parameter to the callback function,
1346-
* and param will be the second parameter.
1347-
*
13481345
*
13491346
* @method addCue
13501347
* @for p5.SoundFile
@@ -1356,10 +1353,10 @@ class SoundFile {
13561353
* the callback function.
13571354
* @param {Function} callback Name of a function that will be
13581355
* called at the given time. The callback will
1359-
* receive time and (optionally) param as its
1360-
* two parameters.
1356+
* optionally receive the third argument as its
1357+
* parameter.
13611358
* @param {Object} [value] An object to be passed as the
1362-
* second parameter to the
1359+
* optional parameter to the
13631360
* callback function.
13641361
* @return {Number} id ID of this cue,
13651362
* useful for removeCue(id)
@@ -1455,7 +1452,6 @@ class SoundFile {
14551452
var leftLimit = this._prevUpdateTime || 0;
14561453
var rightLimit = playbackTime;
14571454
if (leftLimit <= callbackTime && callbackTime <= rightLimit) {
1458-
// pass the scheduled callbackTime as parameter to the callback
14591455
cue.callback(val);
14601456
}
14611457
}

0 commit comments

Comments
 (0)