mirror of
https://github.com/androidx/media.git
synced 2025-05-10 09:12:16 +08:00
Allow seeding of RandomEvaluator.
This is useful for reproducibility in playback tests.
This commit is contained in:
parent
194b4ae081
commit
98d446aa6d
@ -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…
x
Reference in New Issue
Block a user