Skip to content

Commit 47c885c

Browse files
authored
Merge pull request goldfire#1225 from themoonrat/fix-looping-audio
Fixed audio not looping occasionally
2 parents 1007c7f + c64e190 commit 47c885c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/howler.core.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,6 @@
796796
var timeout = (duration * 1000) / Math.abs(sound._rate);
797797
var start = self._sprite[sprite][0] / 1000;
798798
var stop = (self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000;
799-
var loop = !!(sound._loop || self._sprite[sprite][2]);
800799
sound._sprite = sprite;
801800

802801
// Mark the sound as ended instantly so that this async playback
@@ -809,7 +808,7 @@
809808
sound._seek = seek;
810809
sound._start = start;
811810
sound._stop = stop;
812-
sound._loop = loop;
811+
sound._loop = !!(sound._loop || self._sprite[sprite][2]);
813812
};
814813

815814
// End the sound instantly if seek is at the end.

0 commit comments

Comments
 (0)