Setting hasLooped flag when sound has ended and is supposed to loop

This commit is contained in:
Pavle Goloskokovic 2017-12-21 16:53:03 +01:00
parent 879e52a735
commit a766ff9c2c

View file

@ -145,8 +145,7 @@ var WebAudioSound = new Class({
if (ev.target === _this.source) {
// sound ended
if (_this.currentConfig.loop) {
_this.resetConfig();
_this.createAndStartBufferSource();
_this.hasLooped = true;
}
else {
_this.hasEnded = true;