|
|
@ -111,6 +111,8 @@ SoundManager.prototype.playSong = function(song, playBuild, callback) { |
|
|
|
if(callback) |
|
|
|
if(callback) |
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This fixes sync issues on Firefox and slow machines.
|
|
|
|
|
|
|
|
that.context.suspend().then(function() { |
|
|
|
if(playBuild) { |
|
|
|
if(playBuild) { |
|
|
|
// mobile webkit requires offset, even if 0
|
|
|
|
// mobile webkit requires offset, even if 0
|
|
|
|
that.bufSource.start(0); |
|
|
|
that.bufSource.start(0); |
|
|
@ -119,9 +121,9 @@ SoundManager.prototype.playSong = function(song, playBuild, callback) { |
|
|
|
that.bufSource.start(0, that.loopStart); |
|
|
|
that.bufSource.start(0, that.loopStart); |
|
|
|
that.startTime = that.context.currentTime; |
|
|
|
that.startTime = that.context.currentTime; |
|
|
|
} |
|
|
|
} |
|
|
|
// offset to after the build
|
|
|
|
that.context.resume(); |
|
|
|
//that.startTime = that.context.currentTime + that.loopStart;
|
|
|
|
|
|
|
|
that.playing = true; |
|
|
|
that.playing = true; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|