[1.47.12]

Change program code for espeak/libespeak to C, remove C++ features.

Language changes: af, ga, grc, hu, nl, sw, ta


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@364 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2013-09-23 14:20:26 +00:00
parent 507caaaca2
commit 10bd23b3b4
45 changed files with 1847 additions and 577 deletions
+14 -14
View File
@@ -1016,16 +1016,16 @@ static void AdvanceParameters()
for(ix=0; ix <= wvoice->n_harmonic_peaks; ix++)
{
peaks[ix].freq1 += peaks[ix].freq_inc;
peaks[ix].freq = int(peaks[ix].freq1);
peaks[ix].freq = (int)peaks[ix].freq1;
peaks[ix].height1 += peaks[ix].height_inc;
if((peaks[ix].height = int(peaks[ix].height1)) < 0)
if((peaks[ix].height = (int)peaks[ix].height1) < 0)
peaks[ix].height = 0;
peaks[ix].left1 += peaks[ix].left_inc;
peaks[ix].left = int(peaks[ix].left1);
peaks[ix].left = (int)peaks[ix].left1;
if(ix < 3)
{
peaks[ix].right1 += peaks[ix].right_inc;
peaks[ix].right = int(peaks[ix].right1);
peaks[ix].right = (int)peaks[ix].right1;
}
else
{
@@ -1038,10 +1038,10 @@ static void AdvanceParameters()
if(ix < 7)
{
peaks[ix].freq1 += peaks[ix].freq_inc;
peaks[ix].freq = int(peaks[ix].freq1);
peaks[ix].freq = (int)peaks[ix].freq1;
}
peaks[ix].height1 += peaks[ix].height_inc;
if((peaks[ix].height = int(peaks[ix].height1)) < 0)
if((peaks[ix].height = (int)peaks[ix].height1) < 0)
peaks[ix].height = 0;
}
@@ -1157,7 +1157,7 @@ static int ApplyBreath(void)
if((amp = wvoice->breath[ix]) != 0)
{
amp *= (peaks[ix].height >> 14);
value += int(resonator(&rbreath[ix],noise) * amp);
value += (int)resonator(&rbreath[ix],noise) * amp;
}
}
#endif
@@ -1255,7 +1255,7 @@ int Wavegen()
for(pk=wvoice->n_harmonic_peaks+1; pk<N_PEAKS; pk++)
{
// find the nearest harmonic for HF peaks where we don't use shape
peak_harmonic[pk] = peaks[pk].freq / (wdata.pitch*16);
peak_harmonic[pk] = ((peaks[pk].freq / (wdata.pitch*8)) + 1) / 2;
}
// adjust amplitude to compensate for fewer harmonics at higher pitch
@@ -1357,12 +1357,12 @@ int Wavegen()
for(h=1; h<=h_switch_sign; h++)
{
total += (int(sin_tab[theta >> 5]) * harmspect[h]);
total += ((int)sin_tab[theta >> 5] * harmspect[h]);
theta += waveph;
}
while(h<=maxh)
{
total -= (int(sin_tab[theta >> 5]) * harmspect[h]);
total -= ((int)sin_tab[theta >> 5] * harmspect[h]);
theta += waveph;
h++;
}
@@ -1807,27 +1807,27 @@ if(option_log_frames)
if(ix < 7)
{
peaks[ix].freq1 = (fr1->ffreq[ix] * v->freq[ix] + v->freqadd[ix]*256) << 8;
peaks[ix].freq = int(peaks[ix].freq1);
peaks[ix].freq = (int)peaks[ix].freq1;
next = (fr2->ffreq[ix] * v->freq[ix] + v->freqadd[ix]*256) << 8;
peaks[ix].freq_inc = ((next - peaks[ix].freq1) * (STEPSIZE/4)) / length4; // lower headroom for fixed point math
}
peaks[ix].height1 = (fr1->fheight[ix] * v->height[ix]) << 6;
peaks[ix].height = int(peaks[ix].height1);
peaks[ix].height = (int)peaks[ix].height1;
next = (fr2->fheight[ix] * v->height[ix]) << 6;
peaks[ix].height_inc = ((next - peaks[ix].height1) * STEPSIZE) / length2;
if((ix <= 5) && (ix <= wvoice->n_harmonic_peaks))
{
peaks[ix].left1 = (fr1->fwidth[ix] * v->width[ix]) << 10;
peaks[ix].left = int(peaks[ix].left1);
peaks[ix].left = (int)peaks[ix].left1;
next = (fr2->fwidth[ix] * v->width[ix]) << 10;
peaks[ix].left_inc = ((next - peaks[ix].left1) * STEPSIZE) / length2;
if(ix < 3)
{
peaks[ix].right1 = (fr1->fright[ix] * v->width[ix]) << 10;
peaks[ix].right = int(peaks[ix].right1);
peaks[ix].right = (int)peaks[ix].right1;
next = (fr2->fright[ix] * v->width[ix]) << 10;
peaks[ix].right_inc = ((next - peaks[ix].right1) * STEPSIZE) / length2;
}