Class: AuralAlertSystem
Defined in: src/sdk/utils/sound/AuralAlertSystem.ts:285
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
Defined in: src/sdk/utils/sound/AuralAlertSystem.ts:334
Creates a new AuralAlertSystem. The system is initially asleep after being created.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
Returns
AuralAlertSystem
Methods
sleep()
sleep():
void
Defined in: src/sdk/utils/sound/AuralAlertSystem.ts:381
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
wake()
wake():
void
Defined in: src/sdk/utils/sound/AuralAlertSystem.ts:366
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