Skip to content

Commit b087a92

Browse files
Setting startTime to value when sound should start playing and playTime to correct relative value
1 parent d464531 commit b087a92

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ var WebAudioSound = new Class({
122122
var when = this.manager.context.currentTime + delay;
123123
var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;
124124
var duration = this.duration - seek;
125-
this.playTime = this.manager.context.currentTime - seek;
125+
this.playTime = when - seek;
126+
this.startTime = when;
126127
this.source = this.manager.context.createBufferSource();
127128
this.source.buffer = this.audioBuffer;
128129
this.source.connect(this.muteNode);

0 commit comments

Comments
 (0)