Skip to content

Commit 042f778

Browse files
Defining loopEndOffset property for HTML5AudioSoundManager class
1 parent 60693d6 commit 042f778

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSoundManager.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ var HTML5AudioSoundManager = new Class({
2727
* @default 0.1
2828
*/
2929
this.audioPlayDelay = 0.1;
30+
/**
31+
* A value by which we should offset the loop end marker of the looping sound to compensate
32+
* for lag, caused by changing audio tag position, in order to achieve gapless looping.
33+
*
34+
* You might need to tweak this value to get the desired results
35+
* since loop lag varies depending on the browser/platform.
36+
*
37+
* @property {number} loopEndOffset
38+
* @default 0.05
39+
*/
40+
this.loopEndOffset = 0.05;
3041
/**
3142
* An array for keeping track of all the sounds
3243
* that were paused when game lost focus.

0 commit comments

Comments
 (0)