mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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();
|
this.random = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param seed A seed for the underlying random number generator.
|
||||||
|
*/
|
||||||
|
public RandomEvaluator(int seed) {
|
||||||
|
this.random = new Random(seed);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue