*/
jitter = 0.25*(1.0 - 2.0*rand()/RAND_MAX);
b = floor(m*model->Wo/r + 0.5);
+ if (b > ((GLOTTAL_FFT_SIZE/2)-1)) {
+ b = (GLOTTAL_FFT_SIZE/2)-1;
+ }
Ex[m].real = cos(ex_phase[0]*m - jitter*model->Wo*m + glottal[b]);
Ex[m].imag = sin(ex_phase[0]*m - jitter*model->Wo*m + glottal[b]);
}
/* Now set up frequency domain synthesised speech */
for(l=1; l<=model->L; l++) {
b = floor(l*model->Wo*FFT_DEC/TWO_PI + 0.5);
+ if (b > ((FFT_DEC/2)-1)) {
+ b = (FFT_DEC/2)-1;
+ }
Sw_[b].real = model->A[l]*cos(model->phi[l]);
Sw_[b].imag = model->A[l]*sin(model->phi[l]);
Sw_[FFT_DEC-b].real = Sw_[b].real;