Skip to content

five-on-it / apps/client/src/audio/sound-player / Loop

Interface: Loop ​

Defined in: apps/client/src/audio/sound-player.ts:50

A looping sound: started, steered while it plays, stopped.

Properties ​

on ​

readonly on: boolean

Defined in: apps/client/src/audio/sound-player.ts:58

Whether it is started.

Methods ​

set() ​

set(options): void

Defined in: apps/client/src/audio/sound-player.ts:56

Sets how loud it is (a factor on its volume) and its rate.

Parameters ​

options ​
gain? ​

number

rate? ​

number

Returns ​

void


start() ​

start(): void

Defined in: apps/client/src/audio/sound-player.ts:52

Starts it (nothing when it plays).

Returns ​

void


stop() ​

stop(fadeMs?): void

Defined in: apps/client/src/audio/sound-player.ts:54

Stops it, fading out over fadeMs when given.

Parameters ​

fadeMs? ​

number

Returns ​

void