int i;
int mask = (1 << bits) - 1;
+ fixed_sparse->no_repeat_mask = 0;
fixed_sparse->n = 2 * half_pulse_count;
for (i = 0; i < half_pulse_count; i++) {
const int pos1 = gray_decode[fixed_index[2*i+1] & mask] + i;
int i;
for (i=0; i < in->n; i++) {
- int x = in->x[i];
+ int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1);
float y = in->y[i] * scale;
do {
out[x] += y;
y *= in->pitch_fac;
x += in->pitch_lag;
- } while (x < size);
+ } while (x < size && repeats);
}
}
int i;
for (i=0; i < in->n; i++) {
- int x = in->x[i];
+ int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1);
do {
out[x] = 0.0;
x += in->pitch_lag;
- } while (x < size);
+ } while (x < size && repeats);
}
}