Browse Source

Add public API to seed PRNG

master
Yury Popov 2 years ago
parent
commit
09cdf8ce66
No account linked to committer's email address
2 changed files with 10 additions and 0 deletions
  1. 3
    0
      src/include/espeak-ng/espeak_ng.h
  2. 7
    0
      src/libespeak-ng/common.c

+ 3
- 0
src/include/espeak-ng/espeak_ng.h View File

ESPEAK_NG_API espeak_ng_STATUS ESPEAK_NG_API espeak_ng_STATUS
espeak_ng_SetConstF0(int f0); espeak_ng_SetConstF0(int f0);


ESPEAK_NG_API espeak_ng_STATUS
espeak_ng_SetRandSeed(long seed);



#ifdef __cplusplus #ifdef __cplusplus
} }

+ 7
- 0
src/libespeak-ng/common.c View File

(void)espeak_rand(0, 1); // Dummy flush a generator (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

Loading…
Cancel
Save