Browse Source

Flush sonic stream on rate reset

master
Yury Popov 2 years ago
parent
commit
178afb10db
No account linked to committer's email address
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/libespeak-ng/wavegen.c

+ 6
- 0
src/libespeak-ng/wavegen.c View File

@@ -1369,6 +1369,12 @@ static int WavegenFill2()
#if HAVE_SONIC_H
case WCMD_SONIC_SPEED:
sonicSpeed = (double)q[1] / 1024;
if (sonicSpeedupStream && (sonicSpeed <= 1.0)) {
sonicFlushStream(sonicSpeedupStream);
int length = (out_end - out_ptr);
length = sonicReadShortFromStream(sonicSpeedupStream, (short*)out_ptr, length/2);
out_ptr += length * 2;
}
break;
#endif
}

Loading…
Cancel
Save