Skip to main content

SetShapeAllocMixBufferCommand

Allocates a virtual mix buffer.

Syntax

Parameters

command   _Inout_
Type: SHAPE_FLOWGRAPH_COMMAND*
The SHAPE_FLOWGRAPH_COMMAND command to initialize. virtualId   
Type: UINT32
Virtual ID of the mix buffer, from 0 to 8191, inclusive. Each allocated mix buffers must have a unique virtual ID. numIn   
Type: UINT32
Number of inputs to the mix buffer. This value specifies the number of Scalable Hardware Audio Processing Engine (SHAPE) blocks that will output to this mix buffer. numOut   
Type: UINT32
Number of outputs from the mix buffer. This value specifies the number of SHAPE blocks that will read from this mix buffer. attenuation   
Type: SHAPE_MIXBUFFER_ATTENUATION
One member of the SHAPE_MIXBUFFER_ATTENUATION enumeration. This value specifies the dB attenuation applied to all inputs to this mix buffer.

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

All mix buffers are single channel (mono) and must be allocated before use. Although there are a total of 128 physical mix buffers, there are 8192 virtual mix buffers available. Physical mix buffers can be reused, but virtual mix buffers cannot be. The execution list uses virtual IDs for mix buffer assignments. It is only when an allocate command is executed that a physical mix buffer is bound to a given virtual ID. Subsequent commands that use a given virtual ID will be directed to the allocated physical mix buffer. The allocate command is dispatched from the SHAPE Processor to the mix buffer block, which performs the virtual ID to physical mix buffer binding. Many titles do not implement flowgraphs directly. XAudio2 and audio middleware implement SHAPE components implicitly. However, constructing flowgraphs provides the greatest flexibility and access to the audio-acceleration capabilities of the XBOX One console.

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