static short[] doubleToShortArray_iround(double[] a, int start, int end) { short[] b = new[end-start]; for (int i = start; i < end; i++) b[i-start] = clampToShort(iround(a[i])); ret b; }