Skip to main content

SetShapeSrcCommand function

Initializes a SHAPE SRC command.

Syntax

Parameters

command   _Inout_
Type: SHAPE_FLOWGRAPH_COMMAND*
SHAPE_FLOWGRAPH_COMMAND command to initialize. contextId   
Type: UINT32
SRC context ID (index) this command will reference. leftorMonoMixBuffer   
Type: UINT32
Input mix buffer ID. rightMixBuffer   
Type: UINT32
Output mix buffer ID.

Return value

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

Remarks

You can submit flowgraphs to be processed as persistent or non-persistent. Persistent flowgraphs process and then remain resident to repeat their processing in the next frame after read and write pointers have advanced and after other context information is updated. You can use persistent flowgraphs for either of the following scenarios.
  • Highly complex flowgraphs that require a significant amount of CPU processing to reassemble each frame.
  • Highly static flowgraphs with the same number and configuration of voices for an extended period of time.
Use non-persistent flowgraphs for any of the following scenarios.
  • Voice topologies change frequently.
  • The processing cadence of your title’s audio software engine is detached from the SHAPE hardware that is not a multiple of 2.667 ms.
  • You want to run audio processing faster than real-time, where you submit graphs to be consumed as quickly as they are available.
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

SHAPE Overview shapeflowgraph
Last modified on August 20, 2026