code: private int getMaxHeight() {
          int result = 0;
          for (int i = 0; i < segmentCount; i++) {
              result = Math.max(result, segmentHeight(i, false));
          }
          return result;
      }
docs: Scan the segments to find the largest height value present.
  
  @return the largest waveform height anywhere in the preview.