Skip to main content

GetShapeSrcMixBufferPeakMagnitude0

Gets the peak magnitude of the output mix buffer for the left or mono channel.

Syntax

Parameters

context   
Type: SHAPE_SRC_CONTEXT*
Pointer to a SHAPE_SRC_CONTEXT object.

Return value

Type: float The peak magnitude.

Remarks

In addition to monitoring the peak magnitude of each individual hardware block, the peak magnitude of the mix buffers is also maintained. When the output of a hardware block is added to a mix buffer, the peak magnitude is calculated in the same manner: by counting the leading zeros. Each hardware block state maintains an additional pair of four-bit peak-magnitude values. These values represent the peak magnitude of the mix buffer after the output of the hardware block has been accumulated into the mix buffer. One four-bit number represents the ongoing, persistent peak magnitude; the other is updated for every audio frame. The peak-magnitude values are saved in the context of the Scalable Hardware Audio Processing Engine (SHAPE) blocks, even though what’s being represented is the mix buffer state. For more information, see Overflow, magnitude, and saturation in Overview of SHAPE.

Requirements

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

See also

ShapeSrcContext
Last modified on August 20, 2026