code: function() {
              var j, bestOffs, bestCorr, corr, scanCount, corrOffset, tempOffset;
  
              // Slopes the amplitude of the 'midBuffer' samples
              this.precalcCorrReferenceStereo();
  
              bestCorr = Number.MIN_VALUE;
              bestOffs = 0;
              corrOffset = 0;
              tempOffset = 0;
  
              // Scans for the best correlation value using four-pass hierarchical search.
              //
              // The look-up table 'scans' has hierarchical position adjusting steps.
              // In first pass the routine searhes for the highest correlation with
              // relatively coarse steps, then rescans the neighbourhood of the highest
              // correlation with better resolution and so on.
              for (scanCount = 0; scanCount < 4; scanCount++) {
                  j = 0;
                  while (_SCAN_OFFSETS[scanCount][j]) {
                      tempOffset = corrOffset + _SCAN_OFFSETS[scanCount][j];
                      if (tempOffset >= this.seekLength) {
                          break;
                      }
  
                      // Calculates correlation value for the mixing position corresponding
                      // to 'tempOffset'
                      corr = this.calcCrossCorrStereo(
                          2 * tempOffset,
                          this.pRefMidBuffer
                      );
  
                      // Checks for the highest correlation value
                      if (corr > bestCorr) {
                          bestCorr = corr;
                          bestOffs = tempOffset;
                      }
                      j++;
                  }
                  corrOffset = bestOffs;
              }
              return bestOffs;
          }
docs: Seeks for the optimal overlap-mixing position. The 'stereo' version of the
  routine
  
  The best position is determined as the position where the two overlapped
  sample sequences are 'most alike', in terms of the highest cross-correlation
  value over the overlapping period