Import#
import { CngxAudioEngine } from '@cngx/common/audio'
Description#
The audio engine surface. A single write path for muted / volume
(no mute()/unmute() pair); every state change is a reactive Signal.
Index#
Instance Properties#
Methods#
play(name: string, scale?: number)Play a registered earcon by name. Gated + debounced centrally here.
scale (a [0, 1] multiplier over the per-tone default) scales just this
play — used by the directives' per-element audioVolume without touching
the shared master volume.
sequence(steps: unknown, scale?: number)Play an ad-hoc tone sequence. Gated, not debounced. scale as in tone.
@paramsteps
unknowntone(freq: number, durationMs: number, opts?: ToneOptions, scale?: number)Play a single ad-hoc tone. Gated, not debounced, no lastPlayed update.
scale is the same [0, 1] multiplier play() takes and is applied over
opts.gain (or the per-tone default) by the engine.