mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Renamed createLoopBufferSource to createAndStartLoopBufferSource and added some logic for starting loop source
This commit is contained in:
parent
d13bdfde62
commit
dbc4b8b6f2
1 changed files with 4 additions and 1 deletions
|
@ -145,8 +145,11 @@ var WebAudioSound = new Class({
|
|||
/**
|
||||
* @private
|
||||
*/
|
||||
createLoopBufferSource: function () {
|
||||
createAndStartLoopBufferSource: function () {
|
||||
this.loopSource = this.createBufferSource();
|
||||
var offset = this.currentMarker ? this.currentMarker.start : 0;
|
||||
var duration = this.duration;
|
||||
this.loopSource.start(Math.max(0, this.startTime + duration), Math.max(0, offset), Math.max(0, duration));
|
||||
},
|
||||
/**
|
||||
* Used internally to do what the name says.
|
||||
|
|
Loading…
Reference in a new issue