Skip to main content

SetShapeEqCompCommand

Initializes a SHAPE EQ/Comp command.

Syntax

Parameters

command   _Inout_
Type: SHAPE_FLOWGRAPH_COMMAND*
The SHAPE_FLOWGRAPH_COMMAND command to initialize. contextId   
Type: UINT32
EQ/Comp context ID (index) this command will reference. inputMixBuffer   
Type: UINT32
Input mix buffer ID. sidechainMixBuffer   
Type: UINT32
Sidechain mix buffer. This parameter is used for external sidechains only and is ignored for normal and internal sidechains. For more information, see SHAPE_EQCOMP_SIDECHAIN_MODE. outputMixBuffer   
Type: UINT32
Output mix buffer ID.

Return value

Type: HRESULT If the function succeeds it returns S_OK. If one or more arguments are invalid, the function returns E_INVALIDARG.

Remarks

The purpose of the compressor is to limit the amount of dynamic range in the signal. It does this by monitoring the level of input and creating a dynamic gain value. The gain value is then used as a multiplier of the signal and scales it appropriately depending on the current level of the input signal. In other words, it is an automatic volume control, which constantly monitors the input signal and is constantly adjusting itself. The compressor acts only on signals above a specific threshold. If the signal is less than the threshold, the signal passes through unaltered. Threshold is set by the application as part of the EQComp context data. There is programmable control in the context to perform compression or expansion. The compressor alters the sound data according to a ratio parameter. This specifies how much attenuation should be done on the incoming signal if it exceeds the threshold. The ratio is exactly that. It is the ratio of the incoming level to outgoing level. At a ratio of 2:1, every 2 dB of level over the threshold results in 1 dB output from the compressor over the threshold level. With a ratio of 1:1, the compressor is essentially off. Ratio is set by the application as part of the context data.

Requirements

Header: shapeflowgraph.h Supported platforms: XBOX One family consoles and XBOX Series consoles

See also

ACP Overview SHAPE Overview shapeflowgraph
Last modified on August 20, 2026