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

# XDspCommand

> XDspCommand

# XDspCommand

XDSP command.

## Syntax

```cpp theme={null}
typedef struct XDspCommand {  
    float beginScale;  
    float endScale;  
    float* inputBlockBuffer;  
    float* outputBlockBuffer;  
    float* blockBufferMultiplier;  
} XDspCommand  
```

### Members

*beginScale*\
Type: float

Default value is 1.0. This parameter is only used for [XDspProcessType::Convolution](/reference/audio/xdspaudio/enums/xdspprocesstype) processing.

*endScale*\
Type: float

Default value is 1.0. This parameter is only used for [XDspProcessType::Convolution](/reference/audio/xdspaudio/enums/xdspprocesstype) processing. If neither *beginScale* nor *endScale* are 1.0, then all the input or output frames will be scaled according to the following formula:<br />
`outputBlockBuffer[i] = outputBlockBuffer[i] * (XDspCommand::beginScale + (i * step))`
where `step = (XDspCommand::endScale - XDspCommand::beginScale) / XDspActivationParameters::blockFrameCount`

Please see the samples in the GDK download portal [https://aka.ms/gdkdl](https://aka.ms/gdkdl) for an example of using these parameters to ramp up/down.

*inputBlockBuffer*\
Type: float\*

Input buffer to hold one input block of frames of [XDspActivationParameters::blockFrameCount](/reference/audio/xdspaudio/structs/xdspactivationparameters) that will be passed to [XDspSubmitCommand](/reference/audio/xdspaudio/functions/xdspsubmitcommand). This buffer must be part of the memory registered by [XDspConnect](/reference/audio/xdspaudio/functions/xdspconnect). It must also be 16-byte aligned.

*outputBlockBuffer*\
Type: float\*

Output buffer to hold one output block of frames of [XDspActivationParameters::blockFrameCount](/reference/audio/xdspaudio/structs/xdspactivationparameters) that the processing engine will write to this buffer must be part of the memory registered by [XDspConnect](/reference/audio/xdspaudio/functions/xdspconnect). It must also be 16-byte aligned.

*blockBufferMultiplier*\
Type: float\*

A buffer to hold one block of [XDspActivationParameters::blockFrameCount](/reference/audio/xdspaudio/structs/xdspactivationparameters) frames that will be passed to [XDspSubmitCommand](/reference/audio/xdspaudio/functions/xdspsubmitcommand). If this parameter is not NULL, then frame in this buffer will be multiplied by the corresponding frame in *inputBlockBuffer*. This parameter must be used with [XDspProcessType::ForwardFourierTransform](/reference/audio/xdspaudio/enums/xdspprocesstype) only. This buffer must be part of the memory registered by [XDspConnect](/reference/audio/xdspaudio/functions/xdspconnect). It must also be 16-byte aligned.

## Requirements

**Header:** XDspAudio.h

**Supported platforms:** XBOX Series X|S

## Conceptual documentation

* [Overview of a single stream Convolution with Envelope using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope)
* [Overview of a single stream Convolution using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution)

## See also

[XDSP](/reference/audio/xdspaudio/xdspaudio_members)\
[XDspProcessType](/reference/audio/xdspaudio/enums/xdspprocesstype)\
[XDspActivationParameters](/reference/audio/xdspaudio/structs/xdspactivationparameters)\
[XDspSubmitCommand](/reference/audio/xdspaudio/functions/xdspsubmitcommand)\
[XDspConnect](/reference/audio/xdspaudio/functions/xdspconnect)\
[Overview of a single stream Convolution using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution)\
[Overview of a single stream FFT/IFFT using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-fft-ifft)


## Related topics

- [XDspSubmitCommand](/reference/audio/xdspaudio/functions/xdspsubmitcommand.md)
- [XDspSubmitCommandWithEnvelope](/reference/audio/xdspaudio/functions/xdspsubmitcommandwithenvelope.md)
- [XDspActivationOptions](/reference/audio/xdspaudio/enums/xdspactivationoptions.md)
- [XDspConnect](/reference/audio/xdspaudio/functions/xdspconnect.md)
- [Single-stream convolution with envelope using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-convolution-with-envelope.md)
