mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-09 16:01:12 +00:00
Add public API to seed PRNG
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user