VolumeControl
Defined in: packages/voice/src/resource.ts:54
Inline volume of a resource created with inlineVolume: true.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new VolumeControl():
VolumeControl
Returns
Section titled “Returns”VolumeControl
Properties
Section titled “Properties”volume
Section titled “volume”volume:
number=1
Defined in: packages/voice/src/resource.ts:56
Linear gain: 1 is unchanged, 0.5 half, 2 double (clipped).
Methods
Section titled “Methods”apply()
Section titled “apply()”apply(
pcm):Uint8Array
Defined in: packages/voice/src/resource.ts:70
Scales one s16le PCM frame in place.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”Uint8Array
set(
volume):void
Defined in: packages/voice/src/resource.ts:58
Sets a linear gain.
Parameters
Section titled “Parameters”volume
Section titled “volume”number
Returns
Section titled “Returns”void
Throws
Section titled “Throws”For a negative or non-finite value.
setDecibels()
Section titled “setDecibels()”setDecibels(
db):void
Defined in: packages/voice/src/resource.ts:66
Sets a logarithmic gain in decibels (0 is unchanged).
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void