| int ix; | int ix; | ||||
| int h1; | int h1; | ||||
| #ifdef SPECT_EDITOR | |||||
| if (harm_sqrt_n > 0) | |||||
| return HarmToHarmspect(pitch, htab); | |||||
| #endif | |||||
| // initialise as much of *out as we will need | // initialise as much of *out as we will need | ||||
| if (wvoice == NULL) | if (wvoice == NULL) | ||||
| return 1; | return 1; | ||||
| if ((peaks[ix].height = (int)peaks[ix].height1) < 0) | if ((peaks[ix].height = (int)peaks[ix].height1) < 0) | ||||
| peaks[ix].height = 0; | peaks[ix].height = 0; | ||||
| } | } | ||||
| #ifdef SPECT_EDITOR | |||||
| if (harm_sqrt_n != 0) { | |||||
| // We are generating from a harmonic spectrum at a given pitch, not from formant peaks | |||||
| for (ix = 0; ix < harm_sqrt_n; ix++) | |||||
| harm_sqrt[ix] += harm_sqrt_inc[ix]; | |||||
| } | |||||
| #endif | |||||
| } | } | ||||
| #ifndef PLATFORM_RISCOS | #ifndef PLATFORM_RISCOS |