From 628af95325dc418c6bafe7fa9dfde32b392ed277 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 26 Apr 2013 12:38:13 -0400 Subject: [PATCH] CC-2301 : needed to adjust cueout if length information is inaccurate. --- airtime_mvc/public/js/waveformplaylist/track.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airtime_mvc/public/js/waveformplaylist/track.js b/airtime_mvc/public/js/waveformplaylist/track.js index edb221858..66f0ee644 100644 --- a/airtime_mvc/public/js/waveformplaylist/track.js +++ b/airtime_mvc/public/js/waveformplaylist/track.js @@ -192,6 +192,10 @@ TrackEditor.prototype.onTrackLoad = function(buffer) { if (this.cues === undefined) { this.setCuePoints(0, buffer.length - 1); } + //adjust if the length was inaccurate and cueout is set to a higher sample than we actually have. + else if (this.cues.cueout > (buffer.length - 1)) { + this.cues.cueout = buffer.length - 1; + } if (this.width !== undefined) { res = Math.ceil(buffer.length / this.width);