(samples, length, progress)
| 56 | } |
| 57 | }, |
| 58 | _getSampleIndex = function _getSampleIndex(samples, length, progress) { |
| 59 | // slightly slower way than doing this (when there's no lookup): segment.lookup[progress < 1 ? ~~(length / segment.minLength) : segment.lookup.length - 1] || 0; |
| 60 | var l = samples.length, |
| 61 | i = ~~(progress * l); |
| 62 | |
| 63 | if (samples[i] > length) { |
| 64 | while (--i && samples[i] > length) {} |
| 65 | |
| 66 | i < 0 && (i = 0); |
| 67 | } else { |
| 68 | while (samples[++i] < length && i < l) {} |
| 69 | } |
| 70 | |
| 71 | return i < l ? i : l - 1; |
| 72 | }, |
| 73 | _reverseRawPath = function _reverseRawPath(rawPath, skipOuter) { |
| 74 | var i = rawPath.length; |
| 75 | skipOuter || rawPath.reverse(); |
no outgoing calls
no test coverage detected
searching dependent graphs…