# Interface: SoundManagerInterface (/pixi-vn/index/interfaces/SoundManagerInterface)



Defined in: [src/sound/interfaces/SoundManagerInterface.ts:9](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L9)

## Properties [#properties]

### channels [#channels]

\> `readonly` **channels**: [`SoundChannelsInterface`](/pixi-vn/index/interfaces/SoundChannelsInterface)

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:148](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L148)

Namespace for operations on audio channels.

***

### defaultChannelAlias [#defaultchannelalias]

\> **defaultChannelAlias**: `string`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:21](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L21)

The default channel alias used when playing a sound without specifying a
channel. Defaults to `"general"`.

***

### muted [#muted]

\> `readonly` **muted**: `boolean`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:76](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L76)

Whether all sounds are currently muted. Note that individual channels or media instances may still be muted or unmuted; this is just the global master mute state.

***

### ~~speedAll~~ [#speedall]

\> **speedAll**: `number`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:15](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L15)

#### Deprecated [#deprecated]

Global playback speed. This is not a well-supported feature and may be removed in a future release. Use individual sound speed options instead.

***

### unsaved [#unsaved]

\> `readonly` **unsaved**: [`SoundUnsavedInterface`](/pixi-vn/index/interfaces/SoundUnsavedInterface)

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:117](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L117)

Namespace for operations on unsaved / transient playback state (not tracked in save/export state).

***

### volumeAll [#volumeall]

\> **volumeAll**: `number`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:11](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L11)

Master volume in the range \[0, 1].

## Methods [#methods]

### ~~add()~~ [#add]

\> **add**(`alias`, `options`): `void`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:26](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L26)

#### Parameters [#parameters]

##### alias [#alias]

`string`

##### options [#options]

`string`

#### Returns [#returns]

`void`

#### Deprecated [#deprecated-1]

Register sound assets directly via `PIXI.Assets` instead.

***

### ~~addChannel()~~ [#addchannel]

\> **addChannel**(`alias`, `options?`): [`AudioChannelInterface`](/pixi-vn/index/interfaces/AudioChannelInterface) | `undefined`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:134](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L134)

Add a new audio channel.
Returns the created channel, or `undefined` if the alias already exists.

#### Parameters [#parameters-1]

##### alias [#alias-1]

`string` | `string`\[]

##### options? [#options-1]

[`ChannelOptions`](/pixi-vn/index/interfaces/ChannelOptions)

#### Returns [#returns-1]

[`AudioChannelInterface`](/pixi-vn/index/interfaces/AudioChannelInterface) | `undefined`

#### Deprecated [#deprecated-2]

Use [channels](#channels).add instead.

***

### backgroundLoad() [#backgroundload]

\> **backgroundLoad**(...`alias`): `Promise`\<`void`>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:122](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L122)

Trigger background loading of one or more sound assets.

#### Parameters [#parameters-2]

##### alias [#alias-2]

...`string`\[]

#### Returns [#returns-2]

`Promise`\<`void`>

***

### backgroundLoadBundle() [#backgroundloadbundle]

\> **backgroundLoadBundle**(`alias`): `Promise`\<`void`>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:124](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L124)

Trigger background loading of a sound bundle.

#### Parameters [#parameters-3]

##### alias [#alias-3]

`string`

#### Returns [#returns-3]

`Promise`\<`void`>

***

### clear() [#clear]

\> **clear**(): `void`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:127](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L127)

Stop all sounds and clear internal state.

#### Returns [#returns-4]

`void`

***

### duration() [#duration]

\> **duration**(`alias`): `number`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:69](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L69)

Duration in seconds of the loaded sound with the given alias.

#### Parameters [#parameters-4]

##### alias [#alias-4]

`string`

#### Returns [#returns-5]

`number`

***

### export() [#export]

\> **export**(): [`SoundGameState`](/pixi-vn/index/interfaces/SoundGameState)

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:153](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L153)

Export the current sound state, including currently playing sounds and their options, for saving or debugging purposes. This is not guaranteed to be stable across versions and may contain implementation details; it is not intended for use in general application code.

#### Returns [#returns-6]

[`SoundGameState`](/pixi-vn/index/interfaces/SoundGameState)

***

### find() [#find]

\> **find**(`alias`): [`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface) | `undefined`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:51](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L51)

Find a tracked media instance by alias.

#### Parameters [#parameters-5]

##### alias [#alias-5]

`string`

#### Returns [#returns-7]

[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface) | `undefined`

***

### ~~findChannel()~~ [#findchannel]

\> **findChannel**(`alias`): [`AudioChannelInterface`](/pixi-vn/index/interfaces/AudioChannelInterface)

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:143](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L143)

Find the channel for the given alias, creating it if it does not yet exist.

#### Parameters [#parameters-6]

##### alias [#alias-6]

`string`

#### Returns [#returns-8]

[`AudioChannelInterface`](/pixi-vn/index/interfaces/AudioChannelInterface)

#### Deprecated [#deprecated-3]

Use [channels](#channels).find instead.

***

### load() [#load]

\> **load**(...`alias`): `Promise`\<`void`>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:120](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L120)

Load one or more sound assets.

#### Parameters [#parameters-7]

##### alias [#alias-7]

...`string`\[]

#### Returns [#returns-9]

`Promise`\<`void`>

***

### muteAll() [#muteall]

\> **muteAll**(): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:78](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L78)

Mute all sounds.

#### Returns [#returns-10]

`this`

***

### pause() [#pause]

\> **pause**(`alias`): [`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface) | `undefined`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:61](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L61)

Pause a tracked media instance.

#### Parameters [#parameters-8]

##### alias [#alias-8]

`string`

#### Returns [#returns-11]

[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface) | `undefined`

***

### pauseAll() [#pauseall]

\> **pauseAll**(): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:84](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L84)

Pause all sounds.

#### Returns [#returns-12]

`this`

***

### ~~pauseUnsavedAll()~~ [#pauseunsavedall]

\> **pauseUnsavedAll**(`channel?`): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:100](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L100)

Temporarily pause all currently-playing sounds (or just those in the given
channel) without persisting the paused state. Useful for overlays / pause
menus.

Only sounds that are **actively playing** at the time of the call are paused;
sounds that were already paused beforehand are left untouched so that they
remain paused when [resumeUnsavedAll](#resumeunsavedall) is called later.

When called without a channel argument all transient players started with
[playTransient](#playtransient) are also stopped.

#### Parameters [#parameters-9]

##### channel? [#channel]

`string`

#### Returns [#returns-13]

`this`

#### Deprecated [#deprecated-4]

Use [unsaved](#unsaved).pauseAll instead.

***

### play() [#play]

#### Call Signature [#call-signature]

\> **play**(`alias`, `options?`): `Promise`\<[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface)>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:34](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L34)

Plays a sound.

##### Parameters [#parameters-10]

###### alias [#alias-9]

`string`

The media and sound (asset) alias reference.

###### options? [#options-2]

[`SoundPlayOptionsWithChannel`](/pixi-vn/index/interfaces/SoundPlayOptionsWithChannel)

The options.

##### Returns [#returns-14]

`Promise`\<[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface)>

The media instance (resolves immediately if already loaded).

#### Call Signature [#call-signature-1]

\> **play**(`mediaAlias`, `soundAlias`, `options?`): `Promise`\<[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface)>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:35](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L35)

##### Parameters [#parameters-11]

###### mediaAlias [#mediaalias]

`string`

###### soundAlias [#soundalias]

`string`

###### options? [#options-3]

[`SoundPlayOptionsWithChannel`](/pixi-vn/index/interfaces/SoundPlayOptionsWithChannel)

##### Returns [#returns-15]

`Promise`\<[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface)>

***

### ~~playTransient()~~ [#playtransient]

\> **playTransient**(`alias`, `options?`): `Promise`\<`Player`>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:46](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L46)

Plays a non-persistent ("transient") sound (e.g. UI / menu sounds).
Transient playback is not tracked in save/export state.

#### Parameters [#parameters-12]

##### alias [#alias-10]

`string`

##### options? [#options-4]

`Partial`\<`PlayerOptions`>

#### Returns [#returns-16]

`Promise`\<`Player`>

#### Deprecated [#deprecated-5]

Use [unsaved](#unsaved).playTransient instead.

***

### restore() [#restore]

\> **restore**(`data`): `Promise`\<`void`>

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:157](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L157)

Restore a sound state exported by [export](#export). This will stop any currently playing sounds and replace them with the sounds specified in the exported state. This is not guaranteed to be stable across versions and may contain implementation details; it is not intended for use in general application code.

#### Parameters [#parameters-13]

##### data [#data]

`object`

#### Returns [#returns-17]

`Promise`\<`void`>

***

### resume() [#resume]

\> **resume**(`alias`): [`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface) | `undefined`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:66](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L66)

Resume a paused media instance.

#### Parameters [#parameters-14]

##### alias [#alias-11]

`string`

#### Returns [#returns-18]

[`MediaInterface`](/pixi-vn/index/interfaces/MediaInterface) | `undefined`

***

### resumeAll() [#resumeall]

\> **resumeAll**(): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:86](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L86)

Resume all sounds.

#### Returns [#returns-19]

`this`

***

### ~~resumeUnsavedAll()~~ [#resumeunsavedall]

\> **resumeUnsavedAll**(`channel?`): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:107](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L107)

Resume all sounds (or just those in the given channel) that were paused by
the most recent call to [pauseUnsavedAll](#pauseunsavedall). Sounds that were already
paused before `pauseUnsavedAll` was called are **not** resumed.

#### Parameters [#parameters-15]

##### channel? [#channel-1]

`string`

#### Returns [#returns-20]

`this`

#### Deprecated [#deprecated-6]

Use [unsaved](#unsaved).resumeAll instead.

***

### stop() [#stop]

\> **stop**(`alias`): `void`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:56](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L56)

Stop a tracked media instance and remove it from the manager.

#### Parameters [#parameters-16]

##### alias [#alias-12]

`string`

#### Returns [#returns-21]

`void`

***

### stopAll() [#stopall]

\> **stopAll**(): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:82](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L82)

Stop all sounds.

#### Returns [#returns-22]

`this`

***

### ~~stopTransientAll()~~ [#stoptransientall]

\> **stopTransientAll**(): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:112](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L112)

Stop all transient media instances started with [playTransient](#playtransient).

#### Returns [#returns-23]

`this`

#### Deprecated [#deprecated-7]

Use [unsaved](#unsaved).stopTransientAll instead.

***

### toggleMuteAll() [#togglemuteall]

\> **toggleMuteAll**(): `boolean`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:72](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L72)

Toggle mute on all sounds. Returns the new muted state.

#### Returns [#returns-24]

`boolean`

***

### unmuteAll() [#unmuteall]

\> **unmuteAll**(): `this`

Defined in: [src/sound/interfaces/SoundManagerInterface.ts:80](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/sound/interfaces/SoundManagerInterface.ts#L80)

Unmute all sounds.

#### Returns [#returns-25]

`this`
