Skip to content

AudioProvider

Defined in: src/audio-provider.ts:17

The audio backend a game supplies: play/stop clips, set per-channel volume, retune an active playback (for spatial attenuation/pan), and dispose. modules/audio ships a Web Audio implementation.

dispose: () => void

Defined in: src/audio-provider.ts:18

void


play: (clipId, options?) => string

Defined in: src/audio-provider.ts:19

string

AudioPlayOptions

string


setPlaybackPan: (handle, value) => void

Defined in: src/audio-provider.ts:21

Set the stereo pan of one active playback, in [-1, 1]. Unknown handles are ignored.

string

number

void


setPlaybackVolume: (handle, value) => void

Defined in: src/audio-provider.ts:23

Set the volume of one active playback, in [0, 1]. Unknown handles are ignored.

string

number

void


setVolume: (channel, value) => void

Defined in: src/audio-provider.ts:24

string

number

void


stop: (handle) => void

Defined in: src/audio-provider.ts:25

string

void