Skip to content

Latest commit

 

History

History
146 lines (81 loc) · 2.8 KB

_ts_sound_.sound.md

File metadata and controls

146 lines (81 loc) · 2.8 KB

planet-funk > "ts/sound" > Sound

Class: Sound

Hierarchy

Sound

Index

Properties

Methods


Properties

<Private> muffledVolume

● muffledVolume: number

Defined in ts/sound.ts:7

The volume to use for the sound when muffled is passed in.


<Private> normalVolume

● normalVolume: number

Defined in ts/sound.ts:11

The volume to use for the sound when conditions are normal.


<Private> offset

● offset: number

Defined in ts/sound.ts:15

The offset that best suites the audio clip as many have dead space in the beginning.


<Private> sound

● sound: Audio

Defined in ts/sound.ts:19

Audio clip belonging to this sound.


<Private> wasPlaying

● wasPlaying: boolean = false

Defined in ts/sound.ts:23

Flag to track if this sound had been paused.


Methods

pause

pause(): void

Defined in ts/sound.ts:51

Pauses clip if currently playing.

Returns: void


play

play(muffled?: boolean): void

Defined in ts/sound.ts:41

Activate the clip.

Parameters:

Param Type
Optional muffled boolean

Returns: void


resume

resume(): void

Defined in ts/sound.ts:60

Pauses clip if currently playing.

Returns: void


stop

stop(): void

Defined in ts/sound.ts:69

Stops the clip.

Returns: void