genWaveform method

WaveformSound genWaveform(
  1. WaveformType type, {
  2. double freq = 440.0,
})

Generates a waveform sound with provided type and freq.

Implementation

WaveformSound genWaveform(WaveformType type, {double freq = 440.0}) {
  final platformSound = _engine.generateWaveform();
  final sound = WaveformSound._(platformSound);
  _soundsFinalizer.attach(sound, platformSound);
  return sound
    ..type = type
    ..freq = freq;
}