Skip to content

Commit

Permalink
fixed closest
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Carabott committed Jan 20, 2013
1 parent 1aeae63 commit 2a278fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/lyre.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ jQuery(document).ready(function ($) {

selection[0] = parseFloat(analysis.start, 10);

if (closest < points.length - 0) {
if (closest < points.length - 1) {
selection[1] = selection[0] + parseFloat(analysis.duration, 10);
} else {
selection[1] = parseFloat(this.track.buffer.duration, 10);
Expand All @@ -325,7 +325,7 @@ jQuery(document).ready(function ($) {
return this.waveformData.slice(
this.getWaveformDataIndexFromTime(selection[0]),
this.getWaveformDataIndexFromTime(selection[1])
)
);
};

Lyrebird.prototype.zeroPad = function (number) {
Expand Down

0 comments on commit 2a278fd

Please sign in to comment.