Fix a numerical overflow in wavegen() which could cause distortion when a voice file increases the height of formant peaks.

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@92 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2007-10-18 12:09:06 +00:00
parent dbe268fc06
commit e5f2d6f4c6
5 changed files with 14 additions and 23 deletions
+1 -1
View File
@@ -1341,7 +1341,7 @@ static int Wavegen()
z2 = (z2 * mix_wave_amp)/32;
}
z1 = z2 + (((total>>7) * amplitude2) >> 14);
z1 = z2 + (((total>>8) * amplitude2) >> 13);
echo = (echo_buf[echo_tail++] * echo_amp);
z1 += echo >> 8;