Engine class final

Controls loading, unloading and generating of Sounds.

Should be initialized before doing anything. Should be started to hear any sound.

Available extensions

Constructors

Engine.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
isInit bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

genNoise(NoiseType type, {int seed = 0, bool doAddToFinalizer = true}) NoiseSound
Generates a noise sound using given parameters.
genPulse({double freq = 440.0, double dutyCycle = 0.5, bool doAddToFinalizer = true}) PulseSound
Generates a pulsewave sound using given parameters.
genWaveform(WaveformType type, {double freq = 440.0, bool doAddToFinalizer = true}) WaveformSound
Generates a waveform sound using given parameters.
init([int periodMs = 10]) Future<void>
Initializes the engine.
loadSound(TypedData audioData, {bool doAddToFinalizer = true}) Future<LoadedSound>
Copies data to the internal memory location and creates a LoadedSound from it.
loadSoundAsset(String assetPath) Future<LoadedSound>

Available on Engine, provided by the EngineLoadSoundAsset extension

Loads a sound asset and creates a LoadedSound from it.
loadSoundFile(String filePath) Future<LoadedSound>
Loads a file and creates a LoadedSound from it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<void>
Starts the engine.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited