Skip to content

Commit

Permalink
Merge pull request #652 from fabioelia/patch-1
Browse files Browse the repository at this point in the history
Fix a bug with AudioBufferSourceNode
  • Loading branch information
goldfire authored Dec 4, 2016
2 parents 6d82d15 + afa56ea commit bbcbc2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,8 @@
}

// Determine how long to play for and where to start playing.
var seek = sound._seek > 0 ? sound._seek : self._sprite[sprite][0] / 1000;
var duration = ((self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000) - seek;
var seek = Math.max(0, sound._seek > 0 ? sound._seek : self._sprite[sprite][0] / 1000);
var duration = Math.max(0, ((self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000) - seek);
var timeout = (duration * 1000) / Math.abs(sound._rate);

// Update the parameters of the sound
Expand Down

0 comments on commit bbcbc2b

Please sign in to comment.