code: public static void window(int[] samples, int count, int start, int increment,
        int[] windowedSamples) {
      int[] values = windowedSamples;
      int loopCount = 0;
      float halfway = count/2.0f;
      float hth = halfway*halfway;
      float windowCount = -halfway;
      int limit = count*increment+start;
      for(int i = start; i < limit; i+=increment) {
        //float innerCount = (windowCount < 0) ? -windowCount:windowCount;
        float innerCountSquared = windowCount*windowCount;
        windowCount++;
        //double val = 1.0-(double)(innerCount/halfway);
        float val = 1.0f-( innerCountSquared/hth );
        double temp = ((double)samples[i])*val;
        temp = (temp >0) ? temp+0.5:temp-0.5;
        values[loopCount++] = (int)temp;
      }
    }
docs: Apply a window function to sample data
  @param samples Samples to apply window to. Values in this array are left
  unaltered.
  @param count number of samples to use
  @param start index of samples array to start at
  @param increment number of indices to increment between valid samples(for
  interleaved arrays)
  @param windowedSamples array containing windowed values. Return values
  are packed(increment of one).