SoundHandle
Defined in: audio/src/SoundHandle.ts:8
Wraps an IMediaInstance, tracking playing state via end/stop events.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SoundHandle(
instance):SoundHandle
Defined in: audio/src/SoundHandle.ts:17
Parameters
Section titled “Parameters”instance
Section titled “instance”IMediaInstance
Returns
Section titled “Returns”SoundHandle
Accessors
Section titled “Accessors”channel
Section titled “channel”Get Signature
Section titled “Get Signature”get channel():
string
Defined in: audio/src/SoundHandle.ts:38
Mixer channel this sound plays through.
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get id():
number
Defined in: audio/src/SoundHandle.ts:29
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get muted():
boolean
Defined in: audio/src/SoundHandle.ts:131
Returns
Section titled “Returns”boolean
Set Signature
Section titled “Set Signature”set muted(
v):void
Defined in: audio/src/SoundHandle.ts:127
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”void
paused
Section titled “paused”Get Signature
Section titled “Get Signature”get paused():
boolean
Defined in: audio/src/SoundHandle.ts:139
Returns
Section titled “Returns”boolean
Set Signature
Section titled “Set Signature”set paused(
v):void
Defined in: audio/src/SoundHandle.ts:135
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”void
playing
Section titled “playing”Get Signature
Section titled “Get Signature”get playing():
boolean
Defined in: audio/src/SoundHandle.ts:33
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get speed():
number
Defined in: audio/src/SoundHandle.ts:123
Returns
Section titled “Returns”number
Set Signature
Section titled “Set Signature”set speed(
v):void
Defined in: audio/src/SoundHandle.ts:119
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
volume
Section titled “volume”Get Signature
Section titled “Get Signature”get volume():
number
Defined in: audio/src/SoundHandle.ts:61
Returns
Section titled “Returns”number
Set Signature
Section titled “Set Signature”set volume(
v):void
Defined in: audio/src/SoundHandle.ts:55
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Methods
Section titled “Methods”_refreshVolume()
Section titled “_refreshVolume()”_refreshVolume():
void
Defined in: audio/src/SoundHandle.ts:144
Internal
Reapply logical volume after master or channel volume changes.
Returns
Section titled “Returns”void
_setMixer()
Section titled “_setMixer()”_setMixer(
channel,volume,applyVolume,fadeQueue):void
Defined in: audio/src/SoundHandle.ts:149
Internal
Connect this handle to its manager’s channel and fade queue.
Parameters
Section titled “Parameters”channel
Section titled “channel”string
volume
Section titled “volume”number
applyVolume
Section titled “applyVolume”(volume) => void
fadeQueue
Section titled “fadeQueue”ScopedProcessQueue | undefined
Returns
Section titled “Returns”void
fadeTo()
Section titled “fadeTo()”fadeTo(
volume,options):Process
Defined in: audio/src/SoundHandle.ts:69
Fade the pre-channel volume on the engine-global frame clock. Starting a new fade cancels this handle’s current fade.
Parameters
Section titled “Parameters”volume
Section titled “volume”number
options
Section titled “options”Returns
Section titled “Returns”Process
stop()
Section titled “stop()”stop():
void
Defined in: audio/src/SoundHandle.ts:42
Returns
Section titled “Returns”void
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/audio.md.