Skip to content

Commit d13fae2

Browse files
Preventing negative values for source start call
1 parent 150c29a commit d13fae2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ var WebAudioSound = new Class({
124124
}
125125
// else was stopped
126126
}.bind(this);
127-
this.source.start(0, offset, duration);
127+
this.source.start(0, Math.max(0, offset), Math.max(0, duration));
128128
},
129129
/**
130130
* Used internally to do what the name says.

0 commit comments

Comments
 (0)