SoundEngine class abstract

Plays PlaySoundActions and keeps the clock clock triggers tick on.

On the web sounds are synthesised with the Web Audio API and scheduled on AudioContext.currentTime, so a click lined up ahead of time lands exactly on its beat whatever the frame rate or timer jitter. Elsewhere the clock is a stopwatch and sounds are silent.

Implementers

Constructors

SoundEngine()

Properties

available → bool
Whether sounds can be heard.
no setter
hashCode → int
The hash code for this object.
no setterinherited
now → double
Seconds on the clock sounds are scheduled on.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
play(SoundVoice voice, {double? time, double volume = 1, double pitch = 1}) → void
Plays voice at time seconds on now's clock (now if in the past), at volume (0–2) and pitch (a ratio).
resume() → void
Starts (or resumes) audio; browsers allow it only after a user gesture, so this is called on every play.
toString() → String
A string representation of this object.
inherited

Operators

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