init method
Future<void>
init({
- SoundFormat format = SoundFormat.f32,
- int channels = 1,
- int sampleRate = 44100,
- double bufferLenS = 5,
Initializes the generator.
Implementation
Future<void> init({
SoundFormat format = SoundFormat.f32,
int channels = 1,
int sampleRate = 44100,
double bufferLenS = 5,
}) async {
if (!_isInit) {
if (!engine.isInit) await initEngine();
await _generator.init(
format: format,
channels: channels,
sampleRate: sampleRate,
bufferLenS: bufferLenS,
);
_isInit = true;
}
}