index.js
function truncateSamples(samples) {
  /** @type {number} */   
  let len = samples.length;
  for (let i=0; i<len; i++) {
    if (samples[i] > 1) {
      samples[i] = 1;
    } else if (samples[i] < -1) {
      samples[i] = -1;
    }
  }
}
function truncateSamples(samples) {
  /** @type {number} */   
  let len = samples.length;
  for (let i=0; i<len; i++) {
    if (samples[i] > 1) {
      samples[i] = 1;
    } else if (samples[i] < -1) {
      samples[i] = -1;
    }
  }
}
function truncateSamples ( samples ) { /** @type {number} */ let len = samples . length ; for ( let i = 0 ; i < len ; i ++ ) { if ( samples [ i ] > 1 ) { samples [ i ] = 1 ; } else if ( samples [ i ] < - 1 ) { samples [ i ] = - 1 ; } } }
Truncate float samples on over and underflow.
@private
Truncate float samples on over and underflow .