Add public API to seed PRNG

This commit is contained in:
Yury Popov
2022-11-15 09:59:06 +03:00
parent 1e279d3cb8
commit 09cdf8ce66
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -212,6 +212,9 @@ espeak_ng_SetOutputHooks(espeak_ng_OUTPUT_HOOKS* hooks);
ESPEAK_NG_API espeak_ng_STATUS
espeak_ng_SetConstF0(int f0);
ESPEAK_NG_API espeak_ng_STATUS
espeak_ng_SetRandSeed(long seed);
#ifdef __cplusplus
}
+7
View File
@@ -340,3 +340,10 @@ void espeak_srand(long seed) {
(void)espeak_rand(0, 1); // Dummy flush a generator
}
#pragma GCC visibility push(default)
ESPEAK_NG_API espeak_ng_STATUS
espeak_ng_SetRandSeed(long seed) {
espeak_srand(seed);
return ENS_OK;
}
#pragma GCC visibility pop