> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetShapeSrcCommand

> SetShapeSrcCommand

Sets the Sample Rate Convertor (SRC) command.

## Syntax

```cpp theme={null}
HRESULT SetShapeSrcCommand(  
         SHAPE_SRC_CONTEXT* context,  
         SHAPE_SRC_COMMAND_TYPE command  
)  
```

### Parameters

*context*   \_Inout\_\
Type: [SHAPE\_SRC\_CONTEXT](https://docs.xbox.com/reference/audio/shapesrccontext/structs/shape_src_context.md)\*

Pointer to a [SHAPE\_SRC\_CONTEXT](https://docs.xbox.com/reference/audio/shapesrccontext/structs/shape_src_context.md) object.

*command*   \
Type: [SHAPE\_SRC\_COMMAND\_TYPE](https://docs.xbox.com/reference/audio/shapesrccontext/enums/shape_src_command_type.md)

A member of the [SHAPE\_SRC\_COMMAND\_TYPE](https://docs.xbox.com/reference/audio/shapesrccontext/enums/shape_src_command_type.md) enumeration.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The three SRC commands are as follows.

| Command | Action |
| - | - |
| `SHAPE_SRC_COMMAND_TYPE_START` | Perform normal processing and expect more audio data to follow the current flowgraph. |
| `SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE` | Immediately stop processing the source XMA or PCM data. The SRC outputs a zeroed buffer for this frame. |
| `SHAPE_SRC_COMMAND_TYPE_STOP_END` | Stop processing after the current packet. |

For more details, see [SHAPE\_SRC\_COMMAND\_TYPE](https://docs.xbox.com/reference/audio/shapesrccontext/enums/shape_src_command_type.md).

To get the current SRC command, use [GetShapeSrcCommandType](https://docs.xbox.com/reference/audio/shapesrccontext/functions/getshapesrccommandtype.md).

SRC commands can be reported as blocked. For more information, see the [Blocked commands](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md#ID4EBGAC) section of [Overview of SHAPE](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md).

## Requirements

**Header:** shapesrccontext.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[ShapeSrcContext](https://docs.xbox.com/reference/audio/shapesrccontext/shapesrccontext_members.md)


## Related topics

- [SetShapeSrcCommand function](https://docs.xbox.com/reference/audio/shapeflowgraph/functions/shapeflowgraph_setshapesrccommand.md)
- [SHAPE_SRC_COMMAND_TYPE](https://docs.xbox.com/reference/audio/shapesrccontext/enums/shape_src_command_type.md)
- [GetShapeSrcCommandType](https://docs.xbox.com/reference/audio/shapesrccontext/functions/getshapesrccommandtype.md)
- [ShapeFlowGraph](https://docs.xbox.com/reference/audio/shapeflowgraph/shapeflowgraph_members.md)
- [ShapeSrcContext](https://docs.xbox.com/reference/audio/shapesrccontext/shapesrccontext_members.md)
