Skip to main content

Class: AuralAlertSystem

A system which manages and plays aural alerts using a priority queue system.

The system collects registered alerts, and manages how they are played. Each alert belongs to a queue. Only one alert from each queue can play simultaneously. Alerts are queued to be played when they become activated or triggered. If two alerts are queued at the same time, the one with higher priority is played first. Alerts cannot interrupt an already playing alert, regardless of their relative priorities.

Constructors

constructor

new AuralAlertSystem(bus): AuralAlertSystem

Creates a new AuralAlertSystem. The system is initially asleep after being created.

Parameters

NameTypeDescription
busEventBusThe event bus.

Returns

AuralAlertSystem

Defined in

src/sdk/utils/sound/AuralAlertSystem.ts:334

Methods

sleep

sleep(): void

Puts this system to sleep. Clears all triggered and queued alerts and stops all currently playing alerts at the earliest opportunity. While this system is asleep, activating alerts will not queue them to be played and triggering alerts has no effect.

Returns

void

Defined in

src/sdk/utils/sound/AuralAlertSystem.ts:381


wake

wake(): void

Wakes this system. If the sound server is also awake, all active continuous or repeating alerts will be re-queued to play. While both this system and the sound server are awake, activation of alerts will queue them to be played. Activation of any alerts that were already active when the system woke up will not queue them to be played unless the alert was deactivated in the interim.

Returns

void

Defined in

src/sdk/utils/sound/AuralAlertSystem.ts:366