mirror of
https://github.com/samsonjs/media.git
synced 2026-04-03 10:55:48 +00:00
Allow seeding of RandomEvaluator.
This is useful for reproducibility in playback tests.
This commit is contained in:
parent
194b4ae081
commit
98d446aa6d
1 changed files with 7 additions and 0 deletions
|
|
@ -115,6 +115,13 @@ public interface FormatEvaluator {
|
|||
this.random = new Random();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param seed A seed for the underlying random number generator.
|
||||
*/
|
||||
public RandomEvaluator(int seed) {
|
||||
this.random = new Random(seed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
// Do nothing.
|
||||
|
|
|
|||
Loading…
Reference in a new issue