Skip to content

utils.DspUtils.Function.adjustSignalLevel

Christian d'Heureuse edited this page Jun 6, 2026 · 2 revisions

dsp-collection / utils/DspUtils / adjustSignalLevel

Function: adjustSignalLevel()

function adjustSignalLevel(signal, options): void;

Scales signal in place and optionally clips it.

If both targetRms and targetMaxLevel are given, the more restrictive (smaller) factor is used, so neither target is exceeded. Clipping, if enabled, is applied after scaling. A target of 0 (or omitted) is treated as "not specified".

Parameters

signal

MutableArrayLike<number>

options

AdjustSignalLevelOptions

Returns

void

Clone this wiki locally