Taking into account marker start time if marker is currently played

This commit is contained in:
Pavle Goloskokovic 2017-11-23 13:53:57 +01:00
parent 0ded9af3a9
commit d369d46e35

View file

@ -61,7 +61,9 @@ var WebAudioSound = new Class({
}
this.stopAndRemoveBufferSource();
// TODO include config offset and marker start
this.createAndStartBufferSource(0, this.duration);
var offset = this.currentMarker ? this.currentMarker.start : 0;
var duration = this.duration;
this.createAndStartBufferSource(offset, duration);
this.startTime = this.manager.context.currentTime;
this.pausedTime = 0;
return this;