Skip to content

Commit 2995b7e

Browse files
Added short logic explanation for onended event handler
1 parent e13b829 commit 2995b7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ var WebAudioSound = new Class({
111111
this.applyConfig();
112112
this.source.onended = function (ev) {
113113
if (ev.target === this.source) {
114+
// sound ended
114115
this.stop();
115116
}
117+
// else was stopped
116118
}.bind(this);
117119
this.source.start(0, offset, duration);
118120
},

0 commit comments

Comments
 (0)