genNoise method
NoiseSound
genNoise(
- NoiseType type, {
- int seed = 0,
- @Deprecated("Should be used only in special cases (see the migration guide in README).") bool doAddToFinalizer = true,
Generates a noise sound using given parameters.
Implementation
NoiseSound genNoise(
NoiseType type, {
int seed = 0,
@Deprecated(
"Should be used only in special cases (see the migration guide in README).")
bool doAddToFinalizer = true,
}) {
final platformSound = _engine.generateNoise(type: type, seed: seed);
final sound = NoiseSound._(platformSound);
if (doAddToFinalizer) _soundsFinalizer.attach(sound, platformSound);
return sound;
}