Skip to content

Commit

Permalink
Merge pull request #1225 from themoonrat/fix-looping-audio
Browse files Browse the repository at this point in the history
Fixed audio not looping occasionally
  • Loading branch information
goldfire authored Nov 22, 2019
2 parents 1007c7f + c64e190 commit 47c885c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@
var timeout = (duration * 1000) / Math.abs(sound._rate);
var start = self._sprite[sprite][0] / 1000;
var stop = (self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000;
var loop = !!(sound._loop || self._sprite[sprite][2]);
sound._sprite = sprite;

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

// End the sound instantly if seek is at the end.
Expand Down

0 comments on commit 47c885c

Please sign in to comment.