{{ APIRef("DynamicsCompressorNode") }}
The reduction
property of the {{ domxref("DynamicsCompressorNode") }} interface is a {{k-rate}} {{domxref("AudioParam")}} representing the amount of gain reduction currently applied by the compressor to the signal.
Intended for metering purposes, it returns a value in dB, or 0
(no gain reduction) if no signal is fed into the DynamicsCompressorNode
. The range of this value is between -20
and 0
(in dB).
Syntax
var audioCtx = new AudioContext(); var compressor = audioCtx.createDynamicsCompressor(); compressor.reduction.value = -20;
Value
An {{domxref("AudioParam")}}.
Note: Though the {{domxref("AudioParam")}} returned is read-only, the value it represents is not.
Example
{{page("/en-US/docs/Web/API/AudioContext.createDynamicsCompressor","Example")}}
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#widl-DynamicsCompressorNode-reduction', 'reduction')}} | {{Spec2('Web Audio API')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(10.0)}}{{property_prefix("webkit")}} | {{CompatGeckoDesktop(25.0)}} | {{CompatNo}} | 15.0{{property_prefix("webkit")}} 22 (unprefixed) |
6.0{{property_prefix("webkit")}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | 26.0 | 1.2 | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | 33.0 |